{"openapi":"3.1.0","info":{"title":"Forge SIS District API","description":"Comprehensive API for Forge SIS district operations. See the Forge SIS Technical Specification v1.0 §9 and §25.","version":"1.0.0","contact":{"name":"Your Resource Consultants","email":"api@forgesis.com"},"license":{"name":"Commercial"}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"apiKey":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{}},"paths":{"/postman.json":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/healthz":{"get":{"summary":"Liveness probe","tags":["Meta"],"description":"Returns service identity and uptime. Does not hit external dependencies — use /readyz for that.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["forge-sis-api"]},"version":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"uptimeSeconds":{"type":"number"}},"required":["status","service","version","timestamp","uptimeSeconds"],"additionalProperties":false}}}}}}},"/readyz":{"get":{"summary":"Readiness probe","tags":["Meta"],"description":"Actually probes DB and Redis with a per-check 2s timeout. Returns 503 if any hard dependency fails.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string","format":"date-time"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["ok","fail","skip"]},"latencyMs":{"type":"integer"},"error":{"type":"string"}},"required":["status"],"additionalProperties":false}}},"required":["status","timestamp","checks"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string","format":"date-time"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["ok","fail","skip"]},"latencyMs":{"type":"integer"},"error":{"type":"string"}},"required":["status"],"additionalProperties":false}}},"required":["status","timestamp","checks"],"additionalProperties":false}}}}}}},"/version":{"get":{"summary":"Build metadata","tags":["Meta"],"description":"Returns the git sha, build time, and Node version baked in at container-build time. Used for in-field diagnosis.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"gitSha":{"type":"string"},"buildTime":{"type":"string"},"nodeVersion":{"type":"string"}},"required":["name","version","gitSha","buildTime","nodeVersion"],"additionalProperties":false}}}}}}},"/api/auth/login":{"post":{"summary":"Log in with email + password","tags":["Auth"],"description":"Returns a session cookie on success. Subject to rate limits and account lockout after repeated failures.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]+$"},"districtCode":{"type":"string","minLength":1,"maxLength":12},"email":{"type":"string","format":"email","maxLength":200},"password":{"type":"string","minLength":1,"maxLength":200}},"required":["email","password"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"mfaRequired":{"type":"boolean"}},"required":["id","districtId","email","name","roles","mfaRequired"],"additionalProperties":false},"pendingMfaToken":{"type":"string"}},"required":["user"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/login/mfa-verify":{"post":{"summary":"Complete MFA login with a TOTP code","tags":["Auth"],"description":"Second step of the MFA login flow. Consumes the pendingMfaToken returned by /auth/login and validates the TOTP code. Returns the session cookie on success.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pendingMfaToken":{"type":"string","minLength":10,"maxLength":128},"totpCode":{"type":"string","minLength":6,"maxLength":8}},"required":["pendingMfaToken","totpCode"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"mfaRequired":{"type":"boolean"}},"required":["id","districtId","email","name","roles","mfaRequired"],"additionalProperties":false},"pendingMfaToken":{"type":"string"}},"required":["user"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/logout":{"post":{"summary":"Log out (revoke the current session)","tags":["Auth"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"loggedOut":{"type":"boolean","enum":[true]}},"required":["loggedOut"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/auth/session":{"get":{"summary":"Return the current authenticated session, if any","tags":["Auth"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"authenticated":{"type":"boolean"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"permissions":{"type":"array","items":{"type":"string"}},"impersonatedBy":{"type":"string","nullable":true}},"required":["id","districtId","personId","email","name","roles","permissions"],"additionalProperties":false,"nullable":true},"trial":{"type":"object","properties":{"endsAt":{"type":"string","nullable":true},"daysLeft":{"type":"integer","nullable":true},"expired":{"type":"boolean"},"contact":{"type":"string"}},"required":["endsAt","daysLeft","expired","contact"],"additionalProperties":false,"nullable":true},"trialFlow":{"type":"object","properties":{"demoViewer":{"type":"boolean"},"inOwnDistrict":{"type":"boolean"},"ownDistrict":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false,"nullable":true},"demoDistrict":{"type":"string","nullable":true},"demoEndsAt":{"type":"string","nullable":true},"contact":{"type":"string"}},"required":["demoViewer","inOwnDistrict","ownDistrict","demoDistrict"],"additionalProperties":false,"nullable":true}},"required":["authenticated","user"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/auth/request-password-reset":{"post":{"summary":"Request a password reset email","tags":["Auth"],"description":"Always returns 200 — the response does not reveal whether the email exists.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]+$"},"districtCode":{"type":"string","minLength":1,"maxLength":12},"email":{"type":"string","format":"email","maxLength":200}},"required":["email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/auth/complete-password-reset":{"post":{"summary":"Complete a password reset using an emailed token","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]+$"},"districtCode":{"type":"string","minLength":1,"maxLength":12},"email":{"type":"string","format":"email","maxLength":200},"token":{"type":"string","minLength":1,"maxLength":200},"password":{"type":"string","minLength":12,"maxLength":200}},"required":["email","token","password"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/complete-invite":{"post":{"summary":"Complete a user invite (set initial password)","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]+$"},"districtCode":{"type":"string","minLength":1,"maxLength":12},"email":{"type":"string","format":"email","maxLength":200},"token":{"type":"string","minLength":1,"maxLength":200},"password":{"type":"string","minLength":12,"maxLength":200}},"required":["email","token","password"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/districts":{"get":{"summary":"List districts for the login picker (public)","tags":["Auth"],"description":"Name + CDS code + subdomain of every active district, sorted by name. Powers the district dropdown on login and password-reset forms.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"subdomain":{"type":"string","nullable":true}},"required":["code","name","subdomain"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/mfa/status":{"get":{"summary":"Current MFA state for the signed-in user","tags":["Auth"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"required":{"type":"boolean"}},"required":["enabled","required"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/mfa/enroll":{"post":{"summary":"Begin MFA enrollment — returns a secret + QR to scan","tags":["Auth"],"description":"Seals a fresh TOTP secret on the user but leaves MFA disabled until the code is confirmed via /auth/mfa/activate. Safe to call repeatedly; each call rotates the pending secret.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"otpauthUri":{"type":"string"},"secret":{"type":"string"},"qrDataUri":{"type":"string"}},"required":["otpauthUri","secret","qrDataUri"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/mfa/activate":{"post":{"summary":"Confirm the first TOTP code and turn MFA on","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"totpCode":{"type":"string","minLength":6,"maxLength":8}},"required":["totpCode"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/auth/mfa/disable":{"post":{"summary":"Disable MFA (re-verifies the account password)","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":200}},"required":["password"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/auth/saml/metadata":{"get":{"summary":"SAML 2.0 SP metadata","tags":["Auth · SSO"],"description":"Returns SP EntityDescriptor XML for IdP configuration.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/auth/saml/initiate":{"get":{"summary":"Initiate SAML 2.0 SSO for a district","tags":["Auth · SSO"],"description":"Redirects browser to the district IdP with an encoded AuthnRequest.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true},{"schema":{"type":"string"},"in":"query","name":"relayState","required":false}],"responses":{"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/auth/saml/callback":{"post":{"summary":"SAML 2.0 Assertion Consumer Service (ACS)","tags":["Auth · SSO"],"description":"Receives SAMLResponse from IdP and establishes a Forge session.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"SAMLResponse":{"type":"string","minLength":1},"RelayState":{"type":"string"}},"required":["SAMLResponse"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redirectTo":{"type":"string"}},"required":["redirectTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}}},"/auth/oidc/authorize":{"get":{"summary":"Initiate OIDC SSO for a district","tags":["Auth · SSO"],"description":"Redirects browser to the district OIDC IdP with PKCE parameters.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":false},{"schema":{"type":"string","pattern":"^[a-z0-9-]{1,63}$"},"in":"query","name":"subdomain","required":false},{"schema":{"type":"string","maxLength":32},"in":"query","name":"districtCode","required":false},{"schema":{"type":"string"},"in":"query","name":"redirectTo","required":false}],"responses":{"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/auth/oidc/callback":{"get":{"summary":"OIDC authorization code callback","tags":["Auth · SSO"],"description":"Receives authorization code from IdP, exchanges for tokens, creates session.","parameters":[{"schema":{"type":"string"},"in":"query","name":"code","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"error","required":false},{"schema":{"type":"string"},"in":"query","name":"error_description","required":false}],"responses":{"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}}},"/auth/classlink/authorize":{"get":{"summary":"Initiate ClassLink SSO for a district","tags":["Auth · SSO"],"description":"Redirects browser to ClassLink IdP for the district tenant.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true},{"schema":{"type":"string"},"in":"query","name":"redirectTo","required":false}],"responses":{"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/auth/classlink/callback":{"get":{"summary":"ClassLink authorization code callback","tags":["Auth · SSO"],"description":"Receives code from ClassLink, exchanges for tokens, creates Forge session.","parameters":[{"schema":{"type":"string"},"in":"query","name":"code","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"error","required":false}],"responses":{"302":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}}},"/district/sso":{"get":{"summary":"Get SSO provider configurations","tags":["District · SSO"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"saml":{"type":"object","properties":{"entityId":{"type":"string"},"ssoUrl":{"type":"string"},"idpEntityId":{"type":"string"},"certificate":{"type":"string"},"nameIdFormat":{"type":"string"}},"required":["entityId","ssoUrl","idpEntityId","certificate","nameIdFormat"],"additionalProperties":false,"nullable":true},"oidc":{"type":"object","properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"discoveryUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["clientId","clientSecret","discoveryUrl","scopes"],"additionalProperties":false,"nullable":true},"classlink":{"type":"object","properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tenantId":{"type":"string"}},"required":["clientId","clientSecret","tenantId"],"additionalProperties":false,"nullable":true}},"required":["saml","oidc","classlink"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district/sso/saml":{"post":{"summary":"Save SAML 2.0 configuration","tags":["District · SSO"],"description":"Stores SAML IdP settings in District.settings.sso.saml. No migration required.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","format":"uri"},"ssoUrl":{"type":"string","format":"uri"},"idpEntityId":{"type":"string","minLength":1},"certificate":{"type":"string","default":""},"nameIdFormat":{"type":"string"}},"required":["ssoUrl","idpEntityId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district/sso/oidc":{"post":{"summary":"Save OIDC configuration","tags":["District · SSO"],"description":"Stores OIDC client settings in District.settings.sso.oidc.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"discoveryUrl":{"type":"string","format":"uri"},"scopes":{"type":"array","items":{"type":"string"},"default":["openid","email","profile"]}},"required":["clientId","clientSecret","discoveryUrl"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district/sso/classlink":{"post":{"summary":"Save ClassLink SSO configuration","tags":["District · SSO"],"description":"Stores ClassLink tenant settings in District.settings.sso.classlink.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"tenantId":{"type":"string","minLength":1}},"required":["clientId","clientSecret","tenantId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/marketing/plans":{"get":{"summary":"List active pricing tiers for the public /pricing page","tags":["Marketing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"priceLabel":{"type":"string"},"priceCents":{"type":"integer","nullable":true},"period":{"type":"string","nullable":true},"studentLimit":{"type":"string"},"cta":{"type":"string"},"href":{"type":"string"},"highlight":{"type":"boolean"},"features":{"type":"array","items":{"type":"string"}},"sortOrder":{"type":"integer"}},"required":["id","code","name","description","priceLabel","priceCents","period","studentLimit","cta","href","highlight","features","sortOrder"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/marketing/checkout":{"post":{"summary":"Create a Stripe Checkout Session for a plan","tags":["Marketing"],"description":"Anonymous endpoint that opens a hosted Stripe Checkout flow for a prospect. The webhook handler at /api/platform/v1/webhooks/stripe/billing records the completed checkout for manual district provisioning. Requires STRIPE_PRICE_<UPPERCASE_CODE> env var per plan.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string","minLength":1,"maxLength":50},"email":{"type":"string","format":"email"},"successUrl":{"type":"string","format":"uri"},"cancelUrl":{"type":"string","format":"uri"}},"required":["planCode","email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"sessionId":{"type":"string"}},"required":["url","sessionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/marketing/event-catalog":{"get":{"summary":"Event-type catalog with example payloads","tags":["Marketing"],"description":"Public reference for integrators. Walks the platform event registry and emits one example payload per type so developers can prototype receivers without reading TypeScript schemas.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"version":{"type":"integer"},"description":{"type":"string"},"examplePayload":{}},"required":["type","version","description"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/marketing/content":{"get":{"summary":"Bulk-fetch active marketing copy blocks (optionally by slug list)","tags":["Marketing"],"parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"slug","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string"},"content":{}},"required":["slug","kind"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api-keys/usage-summary":{"get":{"summary":"District-wide API usage rollup for the last 7 days","tags":["API Keys"],"description":"Per-day totals across every active key in the district + per-key totals. Daily totals are summed from the same Redis counters the per-key sparkline uses; per-key totals are the sum of that key's 7-day series.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}},"required":["date","count"],"additionalProperties":false}},"total":{"type":"integer"},"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"total7d":{"type":"integer"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","keyPrefix","total7d","lastUsedAt"],"additionalProperties":false}}},"required":["daily","total","keys"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api-keys":{"get":{"summary":"List API keys for the current district","tags":["API Keys"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"ipAllowlist":{"type":"array","items":{"type":"string"},"nullable":true},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"}},"required":["requestsPerMinute"],"additionalProperties":false,"nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"usage7d":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}},"required":["date","count"],"additionalProperties":false}}},"required":["id","name","type","keyPrefix","scopes","ipAllowlist","rateLimit","lastUsedAt","expiresAt","createdAt","usage7d"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a new API key for the current district","tags":["API Keys"],"description":"Generates a cryptographically random key. The plaintext is returned ONCE in the `key` field and cannot be retrieved again.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["public","secret","admin","partner"],"default":"secret"},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100},"ipAllowlist":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":50},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":1,"maximum":100000}},"required":["requestsPerMinute"],"additionalProperties":false},"expiresAt":{"type":"string","format":"date-time"}},"required":["name","scopes"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"row":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"ipAllowlist":{"type":"array","items":{"type":"string"},"nullable":true},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"}},"required":["requestsPerMinute"],"additionalProperties":false,"nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"usage7d":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}},"required":["date","count"],"additionalProperties":false}}},"required":["id","name","type","keyPrefix","scopes","ipAllowlist","rateLimit","lastUsedAt","expiresAt","createdAt","usage7d"],"additionalProperties":false},"key":{"type":"string","description":"The plaintext key — shown once, never returned again."}},"required":["row","key"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api-keys/{id}":{"delete":{"summary":"Revoke an API key (soft-delete via revokedAt)","tags":["API Keys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks":{"get":{"summary":"List webhooks for the current district","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","active","description","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a webhook subscription","tags":["Webhooks"],"description":"Generates a signing secret. The plaintext is returned once in the `signingSecret` field and is never returned again. Use it to verify the `X-Forge-Signature` header on each delivery.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":500},"events":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100},"description":{"type":"string","maxLength":500},"active":{"type":"boolean"}},"required":["url","events"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"row":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","active","description","createdAt"],"additionalProperties":false},"signingSecret":{"type":"string","description":"HMAC-SHA256 signing secret. Shown once."}},"required":["row","signingSecret"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/{id}":{"delete":{"summary":"Delete (soft) a webhook","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"List recent deliveries for a webhook","tags":["Webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"eventId":{"type":"string"},"attempt":{"type":"integer"},"status":{"type":"string"},"responseStatus":{"type":"integer","nullable":true},"scheduledFor":{"type":"string","format":"date-time"},"attemptedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","eventId","attempt","status","responseStatus","scheduledFor","attemptedAt","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/{id}/deliveries/{deliveryId}/resend":{"post":{"summary":"Re-enqueue a past delivery (typically a failed one)","tags":["Webhooks"],"description":"Looks up the original event by id and queues a fresh delivery to this webhook. The receiver will see the same payload + eventType as the first attempt; the new attempt gets a new WebhookDelivery row with attempt=N+1.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"deliveryId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"},"attempt":{"type":"integer"}},"required":["eventId","attempt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Fire a synthetic delivery so the operator can verify their receiver","tags":["Webhooks"],"description":"Enqueues a `WebhookTest` event addressed only to this webhook. The receiver gets a normal, signed delivery with eventType=WebhookTest. Useful as a \"ping\" during integration setup.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/event-types":{"get":{"summary":"Event types that webhooks can subscribe to","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/me/push-token":{"post":{"summary":"Register an Expo push token for the signed-in user","tags":["Auth"],"description":"Stores the Expo push token so the backend can send push notifications to this device. Call this once after login. The token is scoped to the district.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200,"pattern":"^ExponentPushToken\\[.+\\]$|^[a-zA-Z0-9_-]{20,}$"},"platform":{"type":"string","enum":["expo","apns","fcm"],"default":"expo"}},"required":["token"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stored":{"type":"boolean","enum":[true]}},"required":["stored"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove the push token for the signed-in user","tags":["Auth"],"description":"Call on logout so the device no longer receives push notifications.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students":{"get":{"summary":"List students","tags":["Students"],"description":"Returns a paginated list of students in the current district.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"gradeLevel","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","smid","localId","firstName","lastName","preferredName","dateOfBirth","gradeLevel","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false,"description":"Student record"}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a student","tags":["Students"],"description":"Creates a new student record. Emits StudentEnrolled when paired with an enrollment.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"localId":{"type":"string","minLength":1,"maxLength":50},"dateOfBirth":{"type":"string","format":"date"},"gradeLevel":{"type":"string"},"preferredName":{"type":"string"},"primaryLanguage":{"type":"string","minLength":2,"maxLength":2},"raceEthnicity":{"type":"array","items":{"type":"string"}},"parentEducationLevel":{"type":"string","minLength":1,"maxLength":10},"postGradPlan":{"type":"string","enum":["college_4yr","college_2yr","trade","military","employment","other","unknown"]}},"required":["firstName","lastName","localId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","smid","localId","firstName","lastName","preferredName","dateOfBirth","gradeLevel","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false,"description":"Student record"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{id}":{"get":{"summary":"Get student by ID","tags":["Students"],"description":"Returns a single student record. Caller must have student.read permission.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Student UUID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","smid","localId","firstName","lastName","preferredName","dateOfBirth","gradeLevel","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false,"description":"Student record"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update student demographics","tags":["Students"],"description":"Partial update of demographic fields (incl. parentEducationLevel and postGradPlan). Emits StudentDemographicsUpdated.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"preferredName":{"type":"string","maxLength":100,"nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"primaryLanguage":{"type":"string","minLength":2,"maxLength":2,"nullable":true},"raceEthnicity":{"type":"array","items":{"type":"string"}},"parentEducationLevel":{"type":"string","minLength":1,"maxLength":10,"nullable":true},"postGradPlan":{"type":"string","enum":["college_4yr","college_2yr","trade","military","employment","other","unknown"],"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Student UUID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","smid","localId","firstName","lastName","preferredName","dateOfBirth","gradeLevel","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false,"description":"Student record"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{id}/assertions":{"get":{"summary":"List state-reporting assertions (compliance flags) for a student","tags":["Students"],"parameters":[{"schema":{"type":"string","maxLength":50},"in":"query","name":"category","required":false},{"schema":{"type":"boolean"},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Student UUID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"code":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"source":{"type":"string"},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","code","effectiveFrom","effectiveTo","source","notes","isActive"],"additionalProperties":false,"description":"State-reporting assertion (compliance flag) on a student"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record an AT_RISK or TITLE_I assertion for a student","tags":["Students"],"description":"Creates a district-determined state-reporting flag. `effectiveFrom` defaults to today; source is always `district_determination`. Emits AssertionRecorded.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["AT_RISK","TITLE_I"]},"code":{"type":"string","minLength":1,"maxLength":50},"effectiveFrom":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":2000}},"required":["category","code"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Student UUID"}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"code":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"source":{"type":"string"},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","code","effectiveFrom","effectiveTo","source","notes","isActive"],"additionalProperties":false,"description":"State-reporting assertion (compliance flag) on a student"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{id}/assertions/{assertionId}/end":{"post":{"summary":"End a student assertion (sets effectiveTo)","tags":["Students"],"description":"effectiveTo defaults to today. Emits AssertionEnded.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effectiveTo":{"type":"string","format":"date"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Student UUID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"assertionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"code":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"source":{"type":"string"},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","code","effectiveFrom","effectiveTo","source","notes","isActive"],"additionalProperties":false,"description":"State-reporting assertion (compliance flag) on a student"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{personId}/whole-child":{"get":{"summary":"Everything on file about one student, in one response","tags":["Students"],"description":"Assembles special education, health, attendance, academics, discipline, supports and family into a single payload. Each block names the tables it came from; blocks the caller lacks permission for are listed under `withheld`.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"pronouns":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"ageYears":{"type":"integer","nullable":true},"gradeLevel":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"primaryLanguage":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"enrolledSince":{"type":"string","nullable":true}},"required":["id","localId","smid","firstName","lastName","preferredName","pronouns","dateOfBirth","ageYears","gradeLevel","photoUrl","primaryLanguage","isActive","schoolId","schoolName","enrolledSince"],"additionalProperties":false},"headline":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"tone":{"type":"string","enum":["warning","watch","info"]},"source":{"type":"string"}},"required":["text","tone","source"],"additionalProperties":false}},"withheld":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string"},"needs":{"type":"string"}},"required":["section","needs"],"additionalProperties":false}},"specialEducation":{"type":"object","properties":{"source":{"type":"string"},"iep":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"planStart":{"type":"string"},"planEnd":{"type":"string"},"nextReviewDate":{"type":"string","nullable":true},"reevaluationDueDate":{"type":"string","nullable":true},"disabilityCategory":{"type":"string","nullable":true},"lreSetting":{"type":"string","nullable":true},"caseManager":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["id","name","email","phone"],"additionalProperties":false,"nullable":true},"goalCount":{"type":"integer"},"serviceCount":{"type":"integer"},"accommodationCount":{"type":"integer"},"reviewOverdueDays":{"type":"integer","nullable":true}},"required":["id","status","planStart","planEnd","nextReviewDate","reevaluationDueDate","disabilityCategory","lreSetting","caseManager","goalCount","serviceCount","accommodationCount","reviewOverdueDays"],"additionalProperties":false,"nullable":true},"plan504":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"disability":{"type":"string"},"majorLifeActivity":{"type":"string"},"planStartDate":{"type":"string"},"planEndDate":{"type":"string"},"nextReviewDate":{"type":"string","nullable":true},"accommodationCount":{"type":"integer"},"reviewOverdueDays":{"type":"integer","nullable":true}},"required":["id","status","disability","majorLifeActivity","planStartDate","planEndDate","nextReviewDate","accommodationCount","reviewOverdueDays"],"additionalProperties":false,"nullable":true}},"required":["source","iep","plan504"],"additionalProperties":false,"nullable":true},"health":{"type":"object","properties":{"source":{"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"},"since":{"type":"string"}},"required":["code","detail","since"],"additionalProperties":false}},"medications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"frequency":{"type":"string"}},"required":["id","name","dose","route","frequency"],"additionalProperties":false}},"recentVisits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"visitAt":{"type":"string"},"chiefComplaint":{"type":"string"},"disposition":{"type":"string"}},"required":["id","visitAt","chiefComplaint","disposition"],"additionalProperties":false}},"visitsThisYear":{"type":"integer"},"immunizationFlag":{"type":"string","nullable":true}},"required":["source","conditions","medications","recentVisits","visitsThisYear","immunizationFlag"],"additionalProperties":false,"nullable":true},"attendance":{"type":"object","properties":{"source":{"type":"string"},"today":{"type":"object","properties":{"date":{"type":"string"},"status":{"type":"string"},"code":{"type":"string"}},"required":["date","status","code"],"additionalProperties":false,"nullable":true},"rateYtd":{"type":"number","nullable":true},"presentDays":{"type":"integer"},"absentDays":{"type":"integer"},"tardyDays":{"type":"integer"},"consecutiveAbsences":{"type":"integer"},"truancy":{"type":"object","properties":{"status":{"type":"string"},"stage":{"type":"string"},"unexcusedCount":{"type":"integer"}},"required":["status","stage","unexcusedCount"],"additionalProperties":false,"nullable":true}},"required":["source","today","rateYtd","presentDays","absentDays","tardyDays","consecutiveAbsences","truancy"],"additionalProperties":false,"nullable":true},"academics":{"type":"object","properties":{"source":{"type":"string"},"currentGpa":{"type":"number","nullable":true},"cumulativeGpa":{"type":"number","nullable":true},"creditsEarned":{"type":"number","nullable":true},"creditsNeeded":{"type":"number","nullable":true},"classRank":{"type":"integer","nullable":true},"classRankSize":{"type":"integer","nullable":true},"missingAssignments":{"type":"integer"},"courses":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string"},"courseName":{"type":"string"},"teacher":{"type":"string","nullable":true},"room":{"type":"string","nullable":true},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"missingAssignments":{"type":"integer"}},"required":["sectionId","courseName","teacher","room","percentGrade","letterGrade","missingAssignments"],"additionalProperties":false}}},"required":["source","currentGpa","cumulativeGpa","creditsEarned","creditsNeeded","classRank","classRankSize","missingAssignments","courses"],"additionalProperties":false,"nullable":true},"discipline":{"type":"object","properties":{"source":{"type":"string"},"incidentsThisYear":{"type":"integer"},"daysOutOfSchool":{"type":"integer"},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"incidentDate":{"type":"string"},"offenseCode":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"actions":{"type":"array","items":{"type":"string"}}},"required":["id","incidentDate","offenseCode","role","status","actions"],"additionalProperties":false}}},"required":["source","incidentsThisYear","daysOutOfSchool","recent"],"additionalProperties":false,"nullable":true},"supports":{"type":"object","properties":{"source":{"type":"string"},"counselor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["id","name","email","phone"],"additionalProperties":false,"nullable":true},"mealEligibility":{"type":"object","properties":{"category":{"type":"string"},"basis":{"type":"string"},"effectiveFrom":{"type":"string"}},"required":["category","basis","effectiveFrom"],"additionalProperties":false,"nullable":true},"mealBalanceCents":{"type":"integer","nullable":true},"transportation":{"type":"object","properties":{"routeName":{"type":"string"},"stopName":{"type":"string"},"direction":{"type":"string"},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true}},"required":["routeName","stopName","direction","isSpecialEd","accommodations"],"additionalProperties":false,"nullable":true},"programFlags":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"code":{"type":"string"},"since":{"type":"string"}},"required":["category","code","since"],"additionalProperties":false}}},"required":["source","counselor","mealEligibility","mealBalanceCents","transportation","programFlags"],"additionalProperties":false,"nullable":true},"people":{"type":"object","properties":{"source":{"type":"string"},"guardians":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"relationship":{"type":"string"},"hasCustody":{"type":"boolean"},"livesWith":{"type":"boolean"},"canPickup":{"type":"boolean"},"pickupBarredByOrder":{"type":"boolean"},"pickupOnGuardianship":{"type":"boolean"},"emergencyPriority":{"type":"integer"}},"required":["id","name","email","phone","relationship","hasCustody","livesWith","canPickup","pickupBarredByOrder","pickupOnGuardianship","emergencyPriority"],"additionalProperties":false}},"custodyAlerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderType":{"type":"string"},"restrictedPersonName":{"type":"string","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"expiresAt":{"type":"string","nullable":true}},"required":["id","orderType","restrictedPersonName","noPickup","noContactAtSchool","noAccessRecords","expiresAt"],"additionalProperties":false}}},"required":["source","guardians","custodyAlerts"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"}},"required":["student","headline","withheld","specialEducation","health","attendance","academics","discipline","supports","people","generatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons":{"post":{"summary":"Create one person","tags":["Persons"],"description":"Adds a single person record. The local id is generated when it is not given. A likely duplicate — same email, or same name and date of birth — is refused with 409 and the record it matched, and goes through only with allowDuplicate.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personType":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"type":"string","maxLength":100},"preferredName":{"type":"string","maxLength":100},"dateOfBirth":{"type":"string","format":"date"},"email":{"type":"string","format":"email"},"phoneMobile":{"type":"string","maxLength":30},"localId":{"type":"string","maxLength":50},"allowDuplicate":{"type":"boolean"}},"required":["personType","firstName","lastName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personType":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","personType","localId","smid","firstName","middleName","lastName","preferredName","dateOfBirth","email","phoneMobile","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"personType":{"type":"string"},"email":{"type":"string","nullable":true},"reason":{"type":"string"}},"required":["id","localId","firstName","lastName","personType","email","reason"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List persons (students, guardians, staff, alumni, contacts)","tags":["Persons"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"in":"query","name":"personType","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personType":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","personType","localId","smid","firstName","middleName","lastName","preferredName","dateOfBirth","email","phoneMobile","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/quick-search":{"get":{"summary":"Find students and staff by name (command palette)","tags":["Persons"],"description":"A few students and staff whose names match q, limited to the schools the caller can reach. Students come back only with student.read and staff only with staff.read; a caller with one of the two gets an empty list for the other.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":80},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","name","localId","gradeLevel","schoolName"],"additionalProperties":false}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"jobTitle":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"schoolOrganizationId":{"type":"string","nullable":true}},"required":["id","name","jobTitle","schoolName","schoolOrganizationId"],"additionalProperties":false}}},"required":["students","staff"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/{id}":{"get":{"summary":"Get a single person record","tags":["Persons"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personType":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"preferredName":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"parentEducationLevel":{"type":"string","nullable":true},"postGradPlan":{"type":"string","nullable":true}},"required":["id","districtId","personType","localId","smid","firstName","middleName","lastName","preferredName","dateOfBirth","email","phoneMobile","isActive","parentEducationLevel","postGradPlan"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/import":{"post":{"summary":"Bulk CSV import — preview or apply (upserts by localId)","tags":["Persons"],"description":"Upload a CSV of person records. Use `mode=preview` (default) to validate without committing. Use `mode=apply` to upsert all valid rows. Invalid rows are reported per-row and skipped. Upsert key: (districtId, localId).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":5000000},"mode":{"type":"string","enum":["preview","apply"],"default":"preview"}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"valid":{"type":"integer"},"invalid":{"type":"integer"},"created":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"field":{"type":"string"},"message":{"type":"string"}},"required":["row","field","message"],"additionalProperties":false}}},"required":["total","valid","invalid","created","updated","skipped","errors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/bulk":{"patch":{"summary":"Bulk update persons matching a filter","tags":["Persons"],"description":"Update one or more safe fields on all persons matching the filter. Allowed fields: isActive, email, phoneMobile, phoneHome, gender. PII fields (name, DOB) require individual edits.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","properties":{"personType":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"isActive":{"type":"boolean"},"localIdPrefix":{"type":"string","maxLength":50}},"additionalProperties":false},"updates":{"type":"object","properties":{"isActive":{"type":"boolean"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","maxLength":30,"nullable":true},"phoneHome":{"type":"string","maxLength":30,"nullable":true},"gender":{"type":"string","maxLength":20,"nullable":true}},"additionalProperties":false}},"required":["filter","updates"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer"}},"required":["count"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/duplicates":{"get":{"summary":"Detect potential duplicate person records (fuzzy matching)","tags":["Persons"],"parameters":[{"schema":{"type":"string","enum":["STUDENT","GUARDIAN","STAFF","ALUMNI","CONTACT"]},"in":"query","name":"personType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"persons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"localId":{"type":"string"},"personType":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","localId","personType","firstName","lastName","dateOfBirth","email","isActive"],"additionalProperties":false}},"matchReason":{"type":"string"},"confidence":{"type":"string","enum":["high","medium"]}},"required":["persons","matchReason","confidence"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/persons/{id}/merge/{otherId}":{"post":{"summary":"Merge two person records (survivor absorbs the other)","tags":["Persons"],"description":"Re-points FK relations from the absorbed person to the survivor, fills blank fields on the survivor from the absorbed record, then soft-deletes the absorbed person. Student records are not mergeable via API — contact YRC support.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"otherId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"survivorId":{"type":"string","format":"uuid"},"absorbedId":{"type":"string","format":"uuid"}},"required":["survivorId","absorbedId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/guardians":{"get":{"summary":"List guardians","tags":["Guardians"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create guardian","tags":["Guardians"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"localId":{"type":"string","minLength":1,"maxLength":50},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"phoneMobile":{"type":"string","maxLength":30},"homeLanguages":{"type":"array","items":{"type":"string"}}},"required":["localId","firstName","lastName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/guardians/{id}":{"get":{"summary":"Get guardian","tags":["Guardians"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/guardians/{id}/students":{"get":{"summary":"List students linked to this guardian","tags":["Guardians"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"guardianshipId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"relationshipType":{"type":"string"},"hasCustody":{"type":"boolean"},"emergencyContactPriority":{"type":"integer"}},"required":["guardianshipId","studentId","firstName","lastName","relationshipType","hasCustody","emergencyContactPriority"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Link a guardian to a student (emits GuardianLinked)","tags":["Guardians"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"relationshipType":{"type":"string","enum":["mother","father","grandparent","legal_guardian","stepparent","other"]},"hasCustody":{"type":"boolean","default":true},"livesWithStudent":{"type":"boolean","default":true},"canPickup":{"type":"boolean","default":true},"canReceiveComms":{"type":"boolean","default":true},"canAccessRecords":{"type":"boolean","default":true},"emergencyContactPriority":{"type":"integer","minimum":1,"maximum":99,"default":99},"startDate":{"type":"string","format":"date"}},"required":["studentId","relationshipType","startDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"guardianshipId":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["guardianshipId","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/guardianships/{id}":{"delete":{"summary":"Unlink a guardianship (emits GuardianUnlinked)","tags":["Guardians"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{studentId}/custody-orders":{"get":{"summary":"List custody orders for a student","tags":["Custody"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRevoked","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeExpired","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string"},"issuingCourt":{"type":"string","nullable":true},"caseNumber":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"effectiveDate":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentId","restrictedPersonId","orderType","issuingCourt","caseNumber","documentUrl","effectiveDate","expiresAt","noPickup","noContactAtSchool","noReceiveComms","noAccessRecords","notes","recordedByUserId","revokedAt","revokedReason","isExpired","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a new custody order for a student","tags":["Custody"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string","enum":["no_contact","restricted_pickup","supervised_visitation","primary_custody","joint_custody","other"]},"issuingCourt":{"type":"string","maxLength":200,"nullable":true},"caseNumber":{"type":"string","maxLength":100,"nullable":true},"documentUrl":{"type":"string","format":"uri","maxLength":2000,"nullable":true},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean","default":false},"noContactAtSchool":{"type":"boolean","default":false},"noReceiveComms":{"type":"boolean","default":false},"noAccessRecords":{"type":"boolean","default":false},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["studentId","orderType","effectiveDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string"},"issuingCourt":{"type":"string","nullable":true},"caseNumber":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"effectiveDate":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentId","restrictedPersonId","orderType","issuingCourt","caseNumber","documentUrl","effectiveDate","expiresAt","noPickup","noContactAtSchool","noReceiveComms","noAccessRecords","notes","recordedByUserId","revokedAt","revokedReason","isExpired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/custody-orders/{id}":{"get":{"summary":"Get a single custody order by ID","tags":["Custody"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string"},"issuingCourt":{"type":"string","nullable":true},"caseNumber":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"effectiveDate":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentId","restrictedPersonId","orderType","issuingCourt","caseNumber","documentUrl","effectiveDate","expiresAt","noPickup","noContactAtSchool","noReceiveComms","noAccessRecords","notes","recordedByUserId","revokedAt","revokedReason","isExpired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update custody order metadata","tags":["Custody"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuingCourt":{"type":"string","maxLength":200,"nullable":true},"caseNumber":{"type":"string","maxLength":100,"nullable":true},"documentUrl":{"type":"string","format":"uri","maxLength":2000,"nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string"},"issuingCourt":{"type":"string","nullable":true},"caseNumber":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"effectiveDate":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentId","restrictedPersonId","orderType","issuingCourt","caseNumber","documentUrl","effectiveDate","expiresAt","noPickup","noContactAtSchool","noReceiveComms","noAccessRecords","notes","recordedByUserId","revokedAt","revokedReason","isExpired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/custody-orders/{id}/revoke":{"post":{"summary":"Revoke a custody order (soft-expire with reason)","tags":["Custody"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"restrictedPersonId":{"type":"string","format":"uuid","nullable":true},"orderType":{"type":"string"},"issuingCourt":{"type":"string","nullable":true},"caseNumber":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"effectiveDate":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"},"noReceiveComms":{"type":"boolean"},"noAccessRecords":{"type":"boolean"},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentId","restrictedPersonId","orderType","issuingCourt","caseNumber","documentUrl","effectiveDate","expiresAt","noPickup","noContactAtSchool","noReceiveComms","noAccessRecords","notes","recordedByUserId","revokedAt","revokedReason","isExpired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{studentId}/pickup-authorized":{"get":{"summary":"Check pickup authorization for a person + student pair","tags":["Custody"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"personId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"authorized":{"type":"boolean"},"reason":{"type":"string"},"guardianship":{"type":"object","properties":{"hasCustody":{"type":"boolean"},"canPickup":{"type":"boolean"},"relationshipType":{"type":"string"}},"required":["hasCustody","canPickup","relationshipType"],"additionalProperties":false,"nullable":true},"blockingOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderType":{"type":"string"},"noPickup":{"type":"boolean"},"noContactAtSchool":{"type":"boolean"}},"required":["id","orderType","noPickup","noContactAtSchool"],"additionalProperties":false}}},"required":["authorized","reason","guardianship","blockingOrders"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/staff":{"get":{"summary":"List staff (and faculty) records","tags":["Staff"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a staff record","tags":["Staff"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"localId":{"type":"string","minLength":1,"maxLength":50},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"phoneMobile":{"type":"string","maxLength":30}},"required":["localId","firstName","lastName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/staff/{id}":{"get":{"summary":"Get a staff record","tags":["Staff"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"localId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phoneMobile":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","localId","firstName","lastName","email","phoneMobile","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/enrollments":{"get":{"summary":"List enrollments (filter by person, organization, or active-only)","tags":["Enrollments"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"personId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"organizationId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"active","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"exitReason":{"type":"string","nullable":true},"exitCode":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","nullable":true},"isSharedTime":{"type":"boolean"}},"required":["id","districtId","personId","organizationId","enrollmentType","role","gradeLevel","startDate","endDate","exitReason","exitCode","isPrimary","residencyStatus","isSharedTime"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an enrollment (emits StudentEnrolled for students)","tags":["Enrollments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string","minLength":1,"maxLength":50},"gradeLevel":{"type":"string","maxLength":5},"startDate":{"type":"string","format":"date"},"isPrimary":{"type":"boolean","default":true},"residencyStatus":{"type":"string","enum":["resident","nonresident_tuition","state_facility","choice","interdistrict"]},"isSharedTime":{"type":"boolean","default":false}},"required":["personId","organizationId","enrollmentType","role","startDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enrollment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"exitReason":{"type":"string","nullable":true},"exitCode":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","nullable":true},"isSharedTime":{"type":"boolean"}},"required":["id","districtId","personId","organizationId","enrollmentType","role","gradeLevel","startDate","endDate","exitReason","exitCode","isPrimary","residencyStatus","isSharedTime"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["enrollment","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/enrollments/{id}":{"get":{"summary":"Get a single enrollment","tags":["Enrollments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"exitReason":{"type":"string","nullable":true},"exitCode":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","nullable":true},"isSharedTime":{"type":"boolean"}},"required":["id","districtId","personId","organizationId","enrollmentType","role","gradeLevel","startDate","endDate","exitReason","exitCode","isPrimary","residencyStatus","isSharedTime"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an enrollment (grade, primary flag, residency, shared-time)","tags":["Enrollments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gradeLevel":{"type":"string","maxLength":5,"nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","enum":["resident","nonresident_tuition","state_facility","choice","interdistrict"],"nullable":true},"isSharedTime":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enrollment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"exitReason":{"type":"string","nullable":true},"exitCode":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","nullable":true},"isSharedTime":{"type":"boolean"}},"required":["id","districtId","personId","organizationId","enrollmentType","role","gradeLevel","startDate","endDate","exitReason","exitCode","isPrimary","residencyStatus","isSharedTime"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["enrollment","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/enrollments/{id}/end":{"post":{"summary":"End an enrollment (emits StudentWithdrawn for students)","tags":["Enrollments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endDate":{"type":"string","format":"date"},"exitReason":{"type":"string","maxLength":100},"exitCode":{"type":"string","maxLength":10}},"required":["endDate","exitReason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enrollment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"enrollmentType":{"type":"string","enum":["STUDENT","STAFF","FACULTY","VOLUNTEER","CONTRACTOR"]},"role":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"exitReason":{"type":"string","nullable":true},"exitCode":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"residencyStatus":{"type":"string","nullable":true},"isSharedTime":{"type":"boolean"}},"required":["id","districtId","personId","organizationId","enrollmentType","role","gradeLevel","startDate","endDate","exitReason","exitCode","isPrimary","residencyStatus","isSharedTime"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["enrollment","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/organizations":{"get":{"summary":"List organizations (school, department, grade, homeroom, program)","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"in":"query","name":"type","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"parentOrgId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"parentOrgId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"stateCode":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","parentOrgId","type","code","name","shortName","stateCode","gradeRangeLow","gradeRangeHigh","isActive"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an organization","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentOrgId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"stateCode":{"type":"string","maxLength":20},"gradeRangeLow":{"type":"string","maxLength":5},"gradeRangeHigh":{"type":"string","maxLength":5}},"required":["type","code","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"parentOrgId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"stateCode":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","parentOrgId","type","code","name","shortName","stateCode","gradeRangeLow","gradeRangeHigh","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/organizations/{id}":{"get":{"summary":"Get an organization","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"parentOrgId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"stateCode":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","parentOrgId","type","code","name","shortName","stateCode","gradeRangeLow","gradeRangeHigh","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update organization","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentOrgId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"stateCode":{"type":"string","maxLength":20},"gradeRangeLow":{"type":"string","maxLength":5},"gradeRangeHigh":{"type":"string","maxLength":5}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"parentOrgId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","enum":["SCHOOL","DEPARTMENT","GRADE_LEVEL","HOMEROOM","PROGRAM"]},"code":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"stateCode":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","districtId","parentOrgId","type","code","name","shortName","stateCode","gradeRangeLow","gradeRangeHigh","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/schools":{"get":{"summary":"List schools in the current district","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false}},"required":["id","districtId","organizationId","name","code","principal","phone","website","gradeRangeLow","gradeRangeHigh","address","bellSchedule"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a school (also creates its backing Organization row)","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"principal":{"type":"string","maxLength":200},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false,"default":{}},"phone":{"type":"string","maxLength":30},"website":{"type":"string","format":"uri"},"gradeRangeLow":{"type":"string","maxLength":5},"gradeRangeHigh":{"type":"string","maxLength":5},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false,"default":{"periods":[]}}},"required":["code","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false}},"required":["id","districtId","organizationId","name","code","principal","phone","website","gradeRangeLow","gradeRangeHigh","address","bellSchedule"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/schools/{id}":{"get":{"summary":"Get a school","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false}},"required":["id","districtId","organizationId","name","code","principal","phone","website","gradeRangeLow","gradeRangeHigh","address","bellSchedule"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a school","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"principal":{"type":"string","maxLength":200},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false,"default":{}},"phone":{"type":"string","maxLength":30},"website":{"type":"string","format":"uri"},"gradeRangeLow":{"type":"string","maxLength":5},"gradeRangeHigh":{"type":"string","maxLength":5},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false,"default":{"periods":[]}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"gradeRangeLow":{"type":"string","nullable":true},"gradeRangeHigh":{"type":"string","nullable":true},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zip":{"type":"string","maxLength":10}},"additionalProperties":false},"bellSchedule":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["name","start","end"],"additionalProperties":false},"default":[]}},"additionalProperties":false}},"required":["id","districtId","organizationId","name","code","principal","phone","website","gradeRangeLow","gradeRangeHigh","address","bellSchedule"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users":{"get":{"summary":"List district users","tags":["Admin"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["active","invited","disabled"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"status":{"type":"string"},"personId":{"type":"string","format":"uuid"},"emailVerified":{"type":"boolean"},"mfaEnabled":{"type":"boolean"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid"},"code":{"type":"string"},"scope":{"type":"object","additionalProperties":{}}},"required":["roleId","code","scope"],"additionalProperties":false}}},"required":["id","districtId","email","name","status","personId","emailVerified","mfaEnabled","lastLoginAt","roles"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}":{"get":{"summary":"Get a single user","tags":["Admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"status":{"type":"string"},"personId":{"type":"string","format":"uuid"},"emailVerified":{"type":"boolean"},"mfaEnabled":{"type":"boolean"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid"},"code":{"type":"string"},"scope":{"type":"object","additionalProperties":{}}},"required":["roleId","code","scope"],"additionalProperties":false}}},"required":["id","districtId","email","name","status","personId","emailVerified","mfaEnabled","lastLoginAt","roles"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/invite":{"post":{"summary":"Invite a new user (creates User row + issues invite token)","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":200},"personId":{"type":"string","format":"uuid"},"sendEmail":{"type":"boolean","default":true},"mfaRequired":{"type":"boolean","default":false},"welcomeNote":{"type":"string","maxLength":500}},"required":["email","personId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"inviteToken":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["userId","inviteToken","expiresAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/status":{"post":{"summary":"Set a user status (active / disabled)","tags":["Admin"],"description":"Disabling a user revokes all their active sessions.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"]},"reason":{"type":"string","maxLength":500}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"status":{"type":"string"},"personId":{"type":"string","format":"uuid"},"emailVerified":{"type":"boolean"},"mfaEnabled":{"type":"boolean"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid"},"code":{"type":"string"},"scope":{"type":"object","additionalProperties":{}}},"required":["roleId","code","scope"],"additionalProperties":false}}},"required":["id","districtId","email","name","status","personId","emailVerified","mfaEnabled","lastLoginAt","roles"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/mfa-reset":{"post":{"summary":"Reset (disable) a user’s MFA so they can re-enroll","tags":["Admin"],"description":"Recovery path for a user who lost their authenticator. Clears mfaEnabled + the stored secret; the user signs in with their password and re-enrolls. Audited.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"status":{"type":"string"},"personId":{"type":"string","format":"uuid"},"emailVerified":{"type":"boolean"},"mfaEnabled":{"type":"boolean"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid"},"code":{"type":"string"},"scope":{"type":"object","additionalProperties":{}}},"required":["roleId","code","scope"],"additionalProperties":false}}},"required":["id","districtId","email","name","status","personId","emailVerified","mfaEnabled","lastLoginAt","roles"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/modules":{"get":{"summary":"Per-user module access","tags":["Admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"assignmentRequired":{"type":"boolean"},"districtEnabled":{"type":"boolean"},"granted":{"type":"boolean"},"effective":{"type":"boolean"}},"required":["key","name","description","assignmentRequired","districtEnabled","granted","effective"],"additionalProperties":false}}},"required":["modules"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Grant or revoke a module for a user","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"moduleKey":{"type":"string"},"enabled":{"type":"boolean"}},"required":["moduleKey","enabled"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"assignmentRequired":{"type":"boolean"},"districtEnabled":{"type":"boolean"},"granted":{"type":"boolean"},"effective":{"type":"boolean"}},"required":["key","name","description","assignmentRequired","districtEnabled","granted","effective"],"additionalProperties":false}}},"required":["modules"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/send-password-reset":{"post":{"summary":"Issue a password-reset token for a user (admin action)","tags":["Admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["token","expiresAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/roles":{"post":{"summary":"Assign a role (district- or school-scoped) to a user","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleCode":{"type":"string"},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["district","school"]},"schoolId":{"type":"string","format":"uuid"}},"required":["level"],"additionalProperties":false,"description":"Role scope — district-wide or bound to a specific school"}},"required":["roleCode","scope"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"userRoleId":{"type":"string","format":"uuid"}},"required":["userRoleId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/users/{id}/roles/{userRoleId}":{"delete":{"summary":"Revoke a role binding from a user","tags":["Admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userRoleId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"revoked":{"type":"boolean","enum":[true]}},"required":["revoked"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/admin/roles":{"get":{"summary":"List the canonical role catalog","tags":["Admin"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","code","name","description"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/attendance":{"post":{"summary":"Bulk mark attendance","tags":["Attendance"],"description":"Each mark produces one AttendanceMarked event; projections are rebuilt asynchronously.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"marks":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"period":{"type":"string","maxLength":10},"date":{"type":"string","format":"date"},"status":{"type":"string","enum":["present","absent","tardy","excused","half_day","iss","oss","remote"]},"code":{"type":"string","minLength":1,"maxLength":10}},"required":["studentId","date","status","code"],"additionalProperties":false},"minItems":1,"maxItems":500}},"required":["marks"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"integer"},"eventIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["accepted","eventIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"Query attendance days (projection)","tags":["Attendance"],"description":"Reads from projection_attendance_days. Projection is eventually consistent — fresh writes may take a few seconds to reflect.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"status":{"type":"string"},"code":{"type":"string"},"periodBreakdown":{"type":"object","additionalProperties":{}},"lastEventId":{"type":"string"}},"required":["districtId","studentPersonId","schoolId","date","status","code","periodBreakdown","lastEventId"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/events":{"get":{"summary":"Query the event log","tags":["Events"],"description":"Filter by eventType, subjectId, actorId, and time range. The event log is append-only (spec §4 rule 7, §8).","parameters":[{"schema":{"type":"string"},"in":"query","name":"eventType","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"actorId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"eventVersion":{"type":"integer"},"actorId":{"type":"string","format":"uuid","nullable":true},"actorType":{"type":"string","nullable":true},"subjectId":{"type":"string","format":"uuid","nullable":true},"subjectType":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"},"recordedAt":{"type":"string","format":"date-time"},"payload":{"type":"object","additionalProperties":{}},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"correlationId":{"type":"string","nullable":true},"causationId":{"type":"string","nullable":true},"restricted":{"type":"boolean"}},"required":["id","districtId","eventType","eventVersion","actorId","actorType","subjectId","subjectType","occurredAt","recordedAt","payload","metadata","correlationId","causationId","restricted"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/events/{id}":{"get":{"summary":"Get a single event by id","tags":["Events"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"eventVersion":{"type":"integer"},"actorId":{"type":"string","format":"uuid","nullable":true},"actorType":{"type":"string","nullable":true},"subjectId":{"type":"string","format":"uuid","nullable":true},"subjectType":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"},"recordedAt":{"type":"string","format":"date-time"},"payload":{"type":"object","additionalProperties":{}},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"correlationId":{"type":"string","nullable":true},"causationId":{"type":"string","nullable":true},"restricted":{"type":"boolean"}},"required":["id","districtId","eventType","eventVersion","actorId","actorType","subjectId","subjectType","occurredAt","recordedAt","payload","metadata","correlationId","causationId","restricted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{id}/events":{"get":{"summary":"Get a student's event history (audit trail)","tags":["Students","Events"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"eventType","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"eventVersion":{"type":"integer"},"actorId":{"type":"string","format":"uuid","nullable":true},"actorType":{"type":"string","nullable":true},"subjectId":{"type":"string","format":"uuid","nullable":true},"subjectType":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"},"recordedAt":{"type":"string","format":"date-time"},"payload":{"type":"object","additionalProperties":{}},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"correlationId":{"type":"string","nullable":true},"causationId":{"type":"string","nullable":true},"restricted":{"type":"boolean"}},"required":["id","districtId","eventType","eventVersion","actorId","actorType","subjectId","subjectType","occurredAt","recordedAt","payload","metadata","correlationId","causationId","restricted"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/audit-log":{"get":{"summary":"Query the district audit log","tags":["Audit"],"description":"Security-sensitive audit log (spec §4 rule 7). Distinct from the business event log at /events.","parameters":[{"schema":{"type":"string"},"in":"query","name":"action","required":false},{"schema":{"type":"string"},"in":"query","name":"resource","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"actorId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"actorId":{"type":"string","format":"uuid","nullable":true},"actorType":{"type":"string"},"action":{"type":"string"},"resource":{"type":"string"},"resourceId":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{}},"ipAddress":{"type":"string","nullable":true},"userAgent":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","districtId","actorId","actorType","action","resource","resourceId","metadata","ipAddress","userAgent","occurredAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/audit-log/actions":{"get":{"summary":"Distinct audit action values for the district","tags":["Audit"],"description":"Drives the action filter dropdown on the audit trail page.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/my-student-scope":{"get":{"summary":"Show the caller’s authorized student scope, and the rows it yields","tags":["Agents"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"actor":{"type":"object","properties":{"email":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"siteCount":{"type":"integer"}},"required":["email","roles","siteCount"],"additionalProperties":false},"scope":{"type":"object","properties":{"mode":{"type":"string","enum":["district","school","caseload","denied"]},"reason":{"type":"string"},"schoolOrgIds":{"type":"array","items":{"type":"string"}},"caseloadSize":{"type":"integer","nullable":true}},"required":["mode","reason","schoolOrgIds","caseloadSize"],"additionalProperties":false},"sample":{"type":"array","items":{}},"authorizedCount":{"type":"integer"},"returnedCount":{"type":"integer"},"authorizedIds":{"type":"array","items":{"type":"string"}},"authorizedIdsTruncated":{"type":"boolean"}},"required":["actor","scope","sample","authorizedCount","returnedCount","authorizedIds","authorizedIdsTruncated"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents":{"get":{"summary":"List this district’s AI agents (seeds the roster on first read)","tags":["Agents"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"description":{"type":"string"},"skills":{"type":"array","items":{"type":"string"}},"model":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","key","name","role","description","skills","model","status","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/tasks":{"get":{"summary":"List agent tasks (filter by agent and status)","tags":["Agents"],"parameters":[{"schema":{"type":"string","enum":["superintendent","principal","business_office","compliance","facilities","orchestrator"]},"in":"query","name":"agentKey","required":false},{"schema":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"agentName":{"type":"string"},"requestedByPersonId":{"type":"string","format":"uuid","nullable":true},"parentTaskId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"input":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]},"result":{"type":"string","nullable":true},"validationStatus":{"type":"string","nullable":true},"validationNotes":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"costUsd":{"type":"number"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false}},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]}},"required":["id","agentKey","title","status"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"}},"required":["role","text"],"additionalProperties":false}}},"required":["id","agentId","agentKey","agentName","requestedByPersonId","parentTaskId","title","input","status","result","validationStatus","validationNotes","error","inputTokens","outputTokens","costUsd","startedAt","completedAt","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Give an agent a task and run it. Side-effecting steps are drafted for approval, not executed.","tags":["Agents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agentKey":{"type":"string","enum":["superintendent","principal","business_office","compliance","facilities","orchestrator"]},"title":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"string","minLength":1,"maxLength":8000}},"required":["agentKey","input"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"agentName":{"type":"string"},"requestedByPersonId":{"type":"string","format":"uuid","nullable":true},"parentTaskId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"input":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]},"result":{"type":"string","nullable":true},"validationStatus":{"type":"string","nullable":true},"validationNotes":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"costUsd":{"type":"number"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false}},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]}},"required":["id","agentKey","title","status"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"}},"required":["role","text"],"additionalProperties":false}}},"required":["id","agentId","agentKey","agentName","requestedByPersonId","parentTaskId","title","input","status","result","validationStatus","validationNotes","error","inputTokens","outputTokens","costUsd","startedAt","completedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Clear conversations — all of them, or just one agent’s","tags":["Agents"],"description":"Soft-deletes this district’s agent conversations so they leave the chat history. The rows are retained for audit; the AI-call ledger and any approved actions are untouched.","parameters":[{"schema":{"type":"string","enum":["superintendent","principal","business_office","compliance","facilities","orchestrator"]},"in":"query","name":"agentKey","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"integer"}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/tasks/{id}/messages":{"post":{"summary":"Send a follow-up message in a conversation and get the agent’s reply","tags":["Agents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":8000}},"required":["input"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"agentName":{"type":"string"},"requestedByPersonId":{"type":"string","format":"uuid","nullable":true},"parentTaskId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"input":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]},"result":{"type":"string","nullable":true},"validationStatus":{"type":"string","nullable":true},"validationNotes":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"costUsd":{"type":"number"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false}},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]}},"required":["id","agentKey","title","status"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"}},"required":["role","text"],"additionalProperties":false}}},"required":["id","agentId","agentKey","agentName","requestedByPersonId","parentTaskId","title","input","status","result","validationStatus","validationNotes","error","inputTokens","outputTokens","costUsd","startedAt","completedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/tasks/{id}":{"get":{"summary":"Get one task with its skill actions and any subtasks","tags":["Agents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"agentName":{"type":"string"},"requestedByPersonId":{"type":"string","format":"uuid","nullable":true},"parentTaskId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"input":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]},"result":{"type":"string","nullable":true},"validationStatus":{"type":"string","nullable":true},"validationNotes":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"costUsd":{"type":"number"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false}},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentKey":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_review","completed","failed","cancelled"]}},"required":["id","agentKey","title","status"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"}},"required":["role","text"],"additionalProperties":false}}},"required":["id","agentId","agentKey","agentName","requestedByPersonId","parentTaskId","title","input","status","result","validationStatus","validationNotes","error","inputTokens","outputTokens","costUsd","startedAt","completedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete one conversation","tags":["Agents"],"description":"Soft-deletes the conversation and any subtasks the orchestrator spawned under it, so no orphaned children are left behind.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"integer"}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/actions/{id}/approve":{"post":{"summary":"Approve a drafted (act-tier) action — performs the real side effect","tags":["Agents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/actions/{id}/reject":{"post":{"summary":"Reject a drafted action — it is discarded, never executed","tags":["Agents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"skill":{"type":"string"},"tier":{"type":"string","enum":["read","generate","self","act"]},"status":{"type":"string","enum":["proposed","approved","executed","rejected","failed"]},"input":{},"output":{"nullable":true},"error":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","skill","tier","status","error","decidedAt","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/artifacts":{"get":{"summary":"Files an assistant produced during one conversation","tags":["Agents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"taskId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"downloadUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","title","filename","mimeType","sizeBytes","downloadUrl","createdAt"],"additionalProperties":false}},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/agents/artifacts/{id}/download":{"get":{"summary":"Download a file an assistant produced","tags":["Agents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/impersonate/targets":{"get":{"summary":"Every role an admin may view the app as, with the people who hold each and a suggested representative","tags":["Impersonation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"blurb":{"type":"string"}},"required":["key","label","blurb"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"group":{"type":"string"},"description":{"type":"string"},"count":{"type":"integer"},"representative":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false,"nullable":true},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false}}},"required":["code","name","group","description","count","representative","people"],"additionalProperties":false}}},"required":["groups","roles"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/targets/{role}/people":{"get":{"summary":"Search the people who hold one role (for \"choose a person\")","tags":["Impersonation"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":60},"in":"path","name":"role","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false}}},"required":["total","people"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/module-targets":{"get":{"summary":"ITW and IRW roles (each module’s own), with the members who hold each","tags":["Impersonation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"blurb":{"type":"string"},"home":{"type":"string"}},"required":["key","label","blurb","home"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"group":{"type":"string"},"description":{"type":"string"},"count":{"type":"integer"},"representative":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false,"nullable":true},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false}},"module":{"type":"string"},"home":{"type":"string"}},"required":["code","name","group","description","count","representative","people","module","home"],"additionalProperties":false}}},"required":["groups","roles"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/module-targets/{code}/people":{"get":{"summary":"Search the members who hold one ITW or IRW role","tags":["Impersonation"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":60},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["id","name","email","roles","status","detail"],"additionalProperties":false}}},"required":["total","people"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/start":{"post":{"summary":"Begin impersonating a user","tags":["Impersonation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string","format":"uuid"},"viewRole":{"type":"string","maxLength":64,"pattern":"^(?:[a-z_]{2,40}|(?:itw|irw):[A-Z_]{2,40})$"}},"required":["targetUserId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"actingAs":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false},"viewRole":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"module":{"type":"string","enum":["itw","irw"],"nullable":true}},"required":["code","name","module"],"additionalProperties":false,"nullable":true}},"required":["actingAs","viewRole"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/stop":{"post":{"summary":"Stop impersonating and return to the admin session","tags":["Impersonation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stopped":{"type":"boolean","enum":[true]}},"required":["stopped"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/impersonate/status":{"get":{"summary":"Current impersonation state, if any","tags":["Impersonation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"impersonating":{"type":"boolean"},"actingAs":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false,"nullable":true},"viewRole":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"module":{"type":"string","enum":["itw","irw"],"nullable":true}},"required":["code","name","module"],"additionalProperties":false,"nullable":true}},"required":["impersonating","actingAs"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/impersonate/support/users":{"get":{"summary":"Search users to support (help desk)","tags":["Impersonation"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/support/request":{"post":{"summary":"Request support access — emails a one-time code to the user","tags":["Impersonation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string","format":"uuid"}},"required":["targetUserId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sentTo":{"type":"string"}},"required":["sentTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/impersonate/support/verify":{"post":{"summary":"Verify the consent code and start a support session","tags":["Impersonation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserId":{"type":"string","format":"uuid"},"code":{"type":"string","minLength":4,"maxLength":8}},"required":["targetUserId","code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"actingAs":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false}},"required":["actingAs"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/role-access":{"get":{"summary":"Every role with its module access, permissions and user count","tags":["Role access"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"name":{"type":"string"},"userCount":{"type":"number"},"modules":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["agents","audit","command_center","communication","compliance","construction","data_integrations","dms","esign","facilities","finance","food_service","health","hr","irw","itops","itw","omnisafe","public_records","safety","special_ed","state_reporting","study","substitutes","surveys","teacher_cc","tech_support","time_attendance","transportation","tutoring","video","voice","websites"]},"name":{"type":"string"},"enabled":{"type":"boolean"},"assignmentRequired":{"type":"boolean"},"districtEnabled":{"type":"boolean"}},"required":["key","name","enabled","assignmentRequired","districtEnabled"],"additionalProperties":false}},"permissions":{"type":"array","items":{"type":"string"}},"custom":{"type":"boolean"},"baseRole":{"type":"string","nullable":true}},"required":["role","name","userCount","modules","permissions","custom","baseRole"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/role-access/{roleCode}/modules/{moduleKey}":{"put":{"summary":"Grant or revoke a module for a role","tags":["Role access"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":50},"in":"path","name":"roleCode","required":true},{"schema":{"type":"string","enum":["agents","audit","command_center","communication","compliance","construction","data_integrations","dms","esign","facilities","finance","food_service","health","hr","irw","itops","itw","omnisafe","public_records","safety","special_ed","state_reporting","study","substitutes","surveys","teacher_cc","tech_support","time_attendance","transportation","tutoring","video","voice","websites"]},"in":"path","name":"moduleKey","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"boolean","enum":[true]}},"required":["updated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/role-access/{roleCode}/menu":{"get":{"summary":"What a role may see and do in each Facilities and Construction menu item","tags":["Role access"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":50},"in":"path","name":"roleCode","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"href":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"},"level":{"type":"string","enum":["none","view","interact"]},"explicit":{"type":"boolean"},"view":{"type":"array","items":{"type":"string"}},"participate":{"type":"array","items":{"type":"string"}},"interact":{"type":"array","items":{"type":"string"}}},"required":["href","label","group","level","explicit","view","participate","interact"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Set a role’s level on one menu item, or on every item in a group","tags":["Role access"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"href":{"type":"string","maxLength":191},"group":{"type":"string","maxLength":64},"level":{"type":"string","enum":["none","view","interact"]}},"required":["level"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":50},"in":"path","name":"roleCode","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"number"}},"required":["updated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/role-access/me/menu":{"get":{"summary":"Menu levels explicitly set for the roles this user holds","tags":["Role access"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"string","enum":["none","view","interact"]}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/roles":{"post":{"summary":"Create a role for this district, copied from an existing one","tags":["Role access"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"baseRole":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","maxLength":500}},"required":["name","baseRole"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"custom":{"type":"boolean"},"baseRole":{"type":"string","nullable":true},"userCount":{"type":"number"}},"required":["code","name","description","custom","baseRole","userCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/roles/{roleCode}":{"delete":{"summary":"Delete a district’s own role","tags":["Role access"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":50},"in":"path","name":"roleCode","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/school-years":{"get":{"summary":"List school years","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a school year","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":50},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean","default":false}},"required":["name","startDate","endDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-years/current":{"get":{"summary":"Get the active school year for this district","tags":["Scheduling"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-years/{id}":{"get":{"summary":"Get school year","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update school year","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":50},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-years/{id}/actions/set-current":{"post":{"summary":"Mark a school year as current (clears the flag on others)","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"isCurrent":{"type":"boolean"}},"required":["id","districtId","name","startDate","endDate","isCurrent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/terms":{"get":{"summary":"List terms (optionally filter by school year or type)","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false},{"schema":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"in":"query","name":"termType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date","nullable":true},"gradingEndDate":{"type":"string","format":"date","nullable":true},"isGradingPeriod":{"type":"boolean"}},"required":["id","districtId","schoolYearId","termType","name","startDate","endDate","gradingStartDate","gradingEndDate","isGradingPeriod"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a term","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string","minLength":1,"maxLength":100},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date"},"gradingEndDate":{"type":"string","format":"date"},"isGradingPeriod":{"type":"boolean","default":false}},"required":["schoolYearId","termType","name","startDate","endDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date","nullable":true},"gradingEndDate":{"type":"string","format":"date","nullable":true},"isGradingPeriod":{"type":"boolean"}},"required":["id","districtId","schoolYearId","termType","name","startDate","endDate","gradingStartDate","gradingEndDate","isGradingPeriod"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/terms/{id}":{"get":{"summary":"Get a term","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date","nullable":true},"gradingEndDate":{"type":"string","format":"date","nullable":true},"isGradingPeriod":{"type":"boolean"}},"required":["id","districtId","schoolYearId","termType","name","startDate","endDate","gradingStartDate","gradingEndDate","isGradingPeriod"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a term","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string","minLength":1,"maxLength":100},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date"},"gradingEndDate":{"type":"string","format":"date"},"isGradingPeriod":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"termType":{"type":"string","enum":["YEAR","SEMESTER","TRIMESTER","QUARTER","MARKING_PERIOD","PROGRESS_PERIOD"]},"name":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"gradingStartDate":{"type":"string","format":"date","nullable":true},"gradingEndDate":{"type":"string","format":"date","nullable":true},"isGradingPeriod":{"type":"boolean"}},"required":["id","districtId","schoolYearId","termType","name","startDate","endDate","gradingStartDate","gradingEndDate","isGradingPeriod"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/courses":{"get":{"summary":"List courses in the catalog","tags":["Courses"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectArea","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"courseCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"stateCourseCode":{"type":"string","nullable":true},"credits":{"type":"number","nullable":true},"gradeLevels":{"type":"array","items":{"type":"string"}},"subjectArea":{"type":"string"},"department":{"type":"string","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"weightMultiplier":{"type":"number"}},"required":["id","districtId","courseCode","name","shortName","description","stateCourseCode","credits","gradeLevels","subjectArea","department","isHonors","isAP","isIB","isDualEnrollment","weightMultiplier"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a course","tags":["Courses"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courseCode":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"description":{"type":"string","maxLength":2000},"stateCourseCode":{"type":"string","maxLength":20},"credits":{"type":"number","minimum":0,"maximum":10},"gradeLevels":{"type":"array","items":{"type":"string","maxLength":5},"default":[]},"subjectArea":{"type":"string","minLength":1,"maxLength":50},"department":{"type":"string","maxLength":100},"isHonors":{"type":"boolean","default":false},"isAP":{"type":"boolean","default":false},"isIB":{"type":"boolean","default":false},"isDualEnrollment":{"type":"boolean","default":false},"weightMultiplier":{"type":"number","minimum":0,"maximum":2,"default":1},"prerequisiteCourseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"gradingScheme":{"type":"object","additionalProperties":{},"default":{}}},"required":["courseCode","name","subjectArea"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"courseCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"stateCourseCode":{"type":"string","nullable":true},"credits":{"type":"number","nullable":true},"gradeLevels":{"type":"array","items":{"type":"string"}},"subjectArea":{"type":"string"},"department":{"type":"string","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"weightMultiplier":{"type":"number"}},"required":["id","districtId","courseCode","name","shortName","description","stateCourseCode","credits","gradeLevels","subjectArea","department","isHonors","isAP","isIB","isDualEnrollment","weightMultiplier"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/courses/{id}":{"get":{"summary":"Get a course","tags":["Courses"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"courseCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"stateCourseCode":{"type":"string","nullable":true},"credits":{"type":"number","nullable":true},"gradeLevels":{"type":"array","items":{"type":"string"}},"subjectArea":{"type":"string"},"department":{"type":"string","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"weightMultiplier":{"type":"number"}},"required":["id","districtId","courseCode","name","shortName","description","stateCourseCode","credits","gradeLevels","subjectArea","department","isHonors","isAP","isIB","isDualEnrollment","weightMultiplier"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a course","tags":["Courses"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courseCode":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"description":{"type":"string","maxLength":2000},"stateCourseCode":{"type":"string","maxLength":20},"credits":{"type":"number","minimum":0,"maximum":10},"gradeLevels":{"type":"array","items":{"type":"string","maxLength":5},"default":[]},"subjectArea":{"type":"string","minLength":1,"maxLength":50},"department":{"type":"string","maxLength":100},"isHonors":{"type":"boolean","default":false},"isAP":{"type":"boolean","default":false},"isIB":{"type":"boolean","default":false},"isDualEnrollment":{"type":"boolean","default":false},"weightMultiplier":{"type":"number","minimum":0,"maximum":2,"default":1},"prerequisiteCourseIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"gradingScheme":{"type":"object","additionalProperties":{},"default":{}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"courseCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"stateCourseCode":{"type":"string","nullable":true},"credits":{"type":"number","nullable":true},"gradeLevels":{"type":"array","items":{"type":"string"}},"subjectArea":{"type":"string"},"department":{"type":"string","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"weightMultiplier":{"type":"number"}},"required":["id","districtId","courseCode","name","shortName","description","stateCourseCode","credits","gradeLevels","subjectArea","department","isHonors","isAP","isIB","isDualEnrollment","weightMultiplier"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sections":{"get":{"summary":"List sections","tags":["Sections"],"description":"Filter by term, course, organization, or teacher. Teacher filter returns sections where the person is a primary or co-teacher in an active participation.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"courseId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"organizationId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teacherId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"location":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}},"capacity":{"type":"number","nullable":true},"enrollmentCount":{"type":"number"}},"required":["id","districtId","organizationId","schoolId","courseId","termId","sectionCode","name","location","roomId","periodPattern","capacity","enrollmentCount"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a section (emits SectionCreated, optionally TeacherAssignedToSection)","tags":["Sections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"location":{"type":"string","maxLength":100},"roomId":{"type":"string","format":"uuid"},"periodPattern":{"type":"object","additionalProperties":{},"default":{}},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0},"teacherId":{"type":"string","format":"uuid"}},"required":["organizationId","courseId","termId","sectionCode","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"section":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"location":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}},"capacity":{"type":"number","nullable":true},"enrollmentCount":{"type":"number"}},"required":["id","districtId","organizationId","schoolId","courseId","termId","sectionCode","name","location","roomId","periodPattern","capacity","enrollmentCount"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["section","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sections/{id}":{"get":{"summary":"Get a section","tags":["Sections"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"location":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}},"capacity":{"type":"number","nullable":true},"enrollmentCount":{"type":"number"}},"required":["id","districtId","organizationId","schoolId","courseId","termId","sectionCode","name","location","roomId","periodPattern","capacity","enrollmentCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a section (emits SectionScheduleChanged if the schedule changes)","tags":["Sections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"location":{"type":"string","maxLength":100},"periodPattern":{"type":"object","additionalProperties":{},"default":{}},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0},"roomId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"location":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}},"capacity":{"type":"number","nullable":true},"enrollmentCount":{"type":"number"}},"required":["id","districtId","organizationId","schoolId","courseId","termId","sectionCode","name","location","roomId","periodPattern","capacity","enrollmentCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sections/{id}/roster":{"get":{"summary":"Get the active roster for a section","tags":["Sections"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"participationId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["STUDENT","PRIMARY_TEACHER","CO_TEACHER","TEACHING_ASSISTANT","AIDE","OBSERVER"]},"firstName":{"type":"string"},"lastName":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true}},"required":["participationId","personId","role","firstName","lastName","startDate","endDate"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/participations":{"post":{"summary":"Add a person to a section (student, teacher, aide, observer)","tags":["Sections"],"description":"Emits StudentAddedToSection for students, TeacherAssignedToSection for PRIMARY_TEACHER/CO_TEACHER.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["STUDENT","PRIMARY_TEACHER","CO_TEACHER","TEACHING_ASSISTANT","AIDE","OBSERVER"]},"startDate":{"type":"string","format":"date"}},"required":["sectionId","personId","role","startDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"participation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["STUDENT","PRIMARY_TEACHER","CO_TEACHER","TEACHING_ASSISTANT","AIDE","OBSERVER"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true}},"required":["id","districtId","sectionId","personId","role","startDate","endDate"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["participation","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/participations/{id}/end":{"post":{"summary":"End a participation (emits StudentRemovedFromSection for students)","tags":["Sections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endDate":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":200}},"required":["endDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"participation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["STUDENT","PRIMARY_TEACHER","CO_TEACHER","TEACHING_ASSISTANT","AIDE","OBSERVER"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true}},"required":["id","districtId","sectionId","personId","role","startDate","endDate"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["participation","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assignments":{"get":{"summary":"List assignments","tags":["Gradebook"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"sectionId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string","nullable":true},"pointsPossible":{"type":"number"},"weight":{"type":"number"},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"isExtraCredit":{"type":"boolean"},"allowLate":{"type":"boolean"}},"required":["id","districtId","sectionId","name","category","description","pointsPossible","weight","assignedAt","dueAt","publishedAt","isExtraCredit","allowLate"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an assignment (emits AssignmentCreated)","tags":["Gradebook"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","maxLength":2000},"pointsPossible":{"type":"number","minimum":0,"maximum":10000},"weight":{"type":"number","minimum":0,"maximum":10,"default":1},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time"},"isExtraCredit":{"type":"boolean","default":false},"allowLate":{"type":"boolean","default":true}},"required":["sectionId","name","category","pointsPossible"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string","nullable":true},"pointsPossible":{"type":"number"},"weight":{"type":"number"},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"isExtraCredit":{"type":"boolean"},"allowLate":{"type":"boolean"}},"required":["id","districtId","sectionId","name","category","description","pointsPossible","weight","assignedAt","dueAt","publishedAt","isExtraCredit","allowLate"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["assignment","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assignments/{id}":{"get":{"summary":"Get an assignment","tags":["Gradebook"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string","nullable":true},"pointsPossible":{"type":"number"},"weight":{"type":"number"},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"isExtraCredit":{"type":"boolean"},"allowLate":{"type":"boolean"}},"required":["id","districtId","sectionId","name","category","description","pointsPossible","weight","assignedAt","dueAt","publishedAt","isExtraCredit","allowLate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an assignment","tags":["Gradebook"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","maxLength":2000},"pointsPossible":{"type":"number","minimum":0,"maximum":10000},"weight":{"type":"number","minimum":0,"maximum":10,"default":1},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time"},"isExtraCredit":{"type":"boolean","default":false},"allowLate":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string","nullable":true},"pointsPossible":{"type":"number"},"weight":{"type":"number"},"assignedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"isExtraCredit":{"type":"boolean"},"allowLate":{"type":"boolean"}},"required":["id","districtId","sectionId","name","category","description","pointsPossible","weight","assignedAt","dueAt","publishedAt","isExtraCredit","allowLate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assignments/{id}/scores":{"get":{"summary":"List scores for an assignment","tags":["Gradebook"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"points":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"gradedAt":{"type":"string","format":"date-time","nullable":true},"comment":{"type":"string","nullable":true},"isMissing":{"type":"boolean"},"isExempt":{"type":"boolean"},"isLate":{"type":"boolean"}},"required":["id","studentPersonId","points","percent","submittedAt","gradedAt","comment","isMissing","isExempt","isLate"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Bulk enter scores (emits AssignmentScored per student)","tags":["Gradebook"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"points":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true},"comment":{"type":"string","maxLength":1000},"isMissing":{"type":"boolean"},"isExempt":{"type":"boolean"},"isLate":{"type":"boolean"}},"required":["studentId"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["scores"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"integer"},"eventIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["accepted","eventIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/grades/current":{"get":{"summary":"Query the section-grade projection","tags":["Gradebook"],"description":"Reads from projection_section_grades. Eventually consistent — freshly entered scores may take a few seconds to reflect.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"sectionId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"gpaValue":{"type":"number","nullable":true},"missingAssignments":{"type":"number"},"lastEventId":{"type":"string"}},"required":["sectionId","studentPersonId","termId","percentGrade","letterGrade","gpaValue","missingAssignments","lastEventId"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sections/{id}/gradebook":{"get":{"summary":"Complete gradebook view for a section","tags":["Gradebook"],"description":"Returns the section, its active student roster, all assignments, and every score. Suitable for the teacher portal gradebook page.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"section":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"termId":{"type":"string","format":"uuid"}},"required":["id","sectionCode","name","termId"],"additionalProperties":false},"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"pointsPossible":{"type":"number"},"dueAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","category","pointsPossible","dueAt"],"additionalProperties":false}},"students":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["personId","firstName","lastName"],"additionalProperties":false}},"scores":{"type":"array","items":{"type":"object","properties":{"assignmentId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"points":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true}},"required":["assignmentId","studentPersonId","points","percent"],"additionalProperties":false}}},"required":["section","assignments","students","scores"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sections/{id}/actions/publish-grades":{"post":{"summary":"Publish final grades for the term (emits SectionGradePosted per student)","tags":["Gradebook"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"grades":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"letterGrade":{"type":"string","maxLength":5},"percent":{"type":"number","minimum":0,"maximum":200}},"required":["studentId"],"additionalProperties":false},"minItems":1,"maxItems":500}},"required":["termId","grades"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"published":{"type":"integer"},"eventIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["published","eventIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/notification-preferences":{"get":{"summary":"Get notification preferences for the signed-in guardian","tags":["Parent Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attendance":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"grades":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"announcements":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"fees":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"iep504":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"health":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"emergency":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false}},"required":["attendance","grades","announcements","fees","iep504","health","emergency"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update notification preferences for the signed-in guardian","tags":["Parent Portal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"attendance":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"grades":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"announcements":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"fees":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"iep504":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"health":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"emergency":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false}},"required":["attendance","grades","announcements","fees","iep504","health","emergency"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attendance":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"grades":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"announcements":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"fees":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"iep504":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"health":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false},"emergency":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","sms","push"],"additionalProperties":false}},"required":["attendance","grades","announcements","fees","iep504","health","emergency"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students":{"get":{"summary":"List students linked to the signed-in guardian","tags":["Parent Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"attendanceRate":{"type":"number","nullable":true},"currentGpa":{"type":"number","nullable":true},"missingAssignments":{"type":"number"}},"required":["studentId","firstName","lastName","gradeLevel","attendanceRate","currentGpa","missingAssignments"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/attendance":{"get":{"summary":"Attendance days for one of the guardian's students","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"status":{"type":"string"},"code":{"type":"string"}},"required":["date","status","code"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/grades":{"get":{"summary":"Current grades for one of the guardian's students","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"courseCode":{"type":"string"},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"missingAssignments":{"type":"number"}},"required":["sectionId","sectionName","courseCode","percentGrade","letterGrade","missingAssignments"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/assignments":{"get":{"summary":"Upcoming + recent assignments for one of the guardian's students","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"pointsPossible":{"type":"number"},"dueAt":{"type":"string","format":"date-time","nullable":true},"points":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true}},"required":["id","sectionId","sectionName","name","category","pointsPossible","dueAt","points","percent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}":{"get":{"summary":"Student summary card (attendance rate + GPA + current sections)","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel"],"additionalProperties":false},"metrics":{"type":"object","properties":{"attendanceRate":{"type":"number","nullable":true},"tardyCount":{"type":"number"},"disciplineIncidents":{"type":"number"}},"required":["attendanceRate","tardyCount","disciplineIncidents"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sectionCode":{"type":"string"}},"required":["id","name","sectionCode"],"additionalProperties":false}}},"required":["student","metrics","sections"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/schedule":{"get":{"summary":"Current schedule for one of the guardian's students","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}}},"required":["sectionId","sectionName","sectionCode","courseCode","courseName","teacherName","roomNumber","periodPattern"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/inbox":{"get":{"summary":"Messages addressed to the signed-in guardian","tags":["Parent Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"channel":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"senderName":{"type":"string","nullable":true},"isRead":{"type":"boolean"}},"required":["id","subject","body","channel","sentAt","senderName","isRead"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me":{"get":{"summary":"Signed-in student profile","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/schedule":{"get":{"summary":"Signed-in student's current schedule","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"periodPattern":{"type":"object","additionalProperties":{}}},"required":["sectionId","sectionName","sectionCode","courseCode","courseName","teacherName","roomNumber","periodPattern"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/attendance":{"get":{"summary":"Signed-in student's attendance history","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"status":{"type":"string"},"code":{"type":"string"}},"required":["date","status","code"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/grades":{"get":{"summary":"Signed-in student's current grades","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"courseCode":{"type":"string"},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"missingAssignments":{"type":"number"}},"required":["sectionId","sectionName","courseCode","percentGrade","letterGrade","missingAssignments"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/assignments":{"get":{"summary":"Signed-in student's upcoming + recent assignments","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sectionName":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"pointsPossible":{"type":"number"},"dueAt":{"type":"string","format":"date-time","nullable":true},"points":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true}},"required":["id","sectionName","name","category","pointsPossible","dueAt","points","percent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/course-requests":{"get":{"summary":"List course requests","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["pending","scheduled","unscheduled","waived"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"priority":{"type":"integer"},"status":{"type":"string"},"assignedSectionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","districtId","studentPersonId","courseId","termId","priority","status","assignedSectionId","notes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a course request","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"priority":{"type":"integer","minimum":1,"maximum":100,"default":1},"notes":{"type":"string","maxLength":500}},"required":["studentId","courseId","termId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"priority":{"type":"integer"},"status":{"type":"string"},"assignedSectionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","districtId","studentPersonId","courseId","termId","priority","status","assignedSectionId","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/course-requests/{id}":{"get":{"summary":"Get a course request","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"priority":{"type":"integer"},"status":{"type":"string"},"assignedSectionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","districtId","studentPersonId","courseId","termId","priority","status","assignedSectionId","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a course request","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"priority":{"type":"integer","minimum":1,"maximum":100},"status":{"type":"string","enum":["pending","scheduled","unscheduled","waived"]},"notes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"priority":{"type":"integer"},"status":{"type":"string"},"assignedSectionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","districtId","studentPersonId","courseId","termId","priority","status","assignedSectionId","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a course request","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/scheduling/master-schedule":{"get":{"summary":"Master schedule for a term (sections + live conflicts)","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"name":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherPersonId":{"type":"string","format":"uuid","nullable":true},"teacherParticipationId":{"type":"string","format":"uuid","nullable":true},"teacherName":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"enrollmentCount":{"type":"integer"},"periodPattern":{"type":"object","additionalProperties":{}}},"required":["id","sectionCode","name","courseCode","courseName","teacherPersonId","teacherParticipationId","teacherName","location","capacity","enrollmentCount","periodPattern"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"message":{"type":"string"},"slot":{"type":"object","properties":{"day":{"type":"string"},"period":{"type":"string"}},"required":["day","period"],"additionalProperties":false}},"required":["kind","sectionIds","message"],"additionalProperties":false}}},"required":["sections","conflicts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/scheduling/conflicts":{"get":{"summary":"Detect master-schedule conflicts for a term","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"message":{"type":"string"},"slot":{"type":"object","properties":{"day":{"type":"string"},"period":{"type":"string"}},"required":["day","period"],"additionalProperties":false}},"required":["kind","sectionIds","message"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/scheduling/propose":{"post":{"summary":"Run the CSP solver and return a proposed assignment (no writes)","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"timeBudgetMs":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":30000,"default":5000},"studentIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["termId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"courseRequestId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"}},"required":["courseRequestId","studentPersonId","sectionId"],"additionalProperties":false}},"unscheduled":{"type":"array","items":{"type":"object","properties":{"courseRequestId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"courseId":{"type":"string","format":"uuid"},"reason":{"type":"string"}},"required":["courseRequestId","studentPersonId","courseId","reason"],"additionalProperties":false}},"hitTimeLimit":{"type":"boolean"},"sectionLoad":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["assignments","unscheduled","hitTimeLimit","sectionLoad"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/scheduling/publish":{"post":{"summary":"Apply a proposal: create participations + mark course requests scheduled + emit StudentScheduled events","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"assignments":{"type":"array","items":{"type":"object","properties":{"courseRequestId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"}},"required":["courseRequestId","studentPersonId","sectionId"],"additionalProperties":false},"minItems":1,"maxItems":2000},"effectiveDate":{"type":"string","format":"date"}},"required":["termId","assignments","effectiveDate"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"createdParticipations":{"type":"integer"},"eventIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["createdParticipations","eventIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/visits":{"get":{"summary":"List nurse visits","tags":["Health"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"visitAt":{"type":"string","format":"date-time"},"chiefComplaint":{"type":"string"},"disposition":{"type":"string"},"notes":{"type":"string","nullable":true},"durationMinutes":{"type":"integer","nullable":true}},"required":["id","studentPersonId","visitAt","chiefComplaint","disposition","notes","durationMinutes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a nurse visit (emits HealthEncounter)","tags":["Health"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"visitAt":{"type":"string","format":"date-time"},"chiefComplaint":{"type":"string","minLength":1,"maxLength":200},"disposition":{"type":"string","minLength":1,"maxLength":60},"notes":{"type":"string","maxLength":2000},"durationMinutes":{"type":"integer","minimum":0,"maximum":480},"bodyLocation":{"type":"string","maxLength":200},"painScale":{"type":"integer","minimum":0,"maximum":10},"temperatureF":{"type":"number","minimum":70,"maximum":115},"pulse":{"type":"integer","minimum":20,"maximum":250},"respirations":{"type":"integer","minimum":4,"maximum":80},"bloodPressure":{"type":"string","maxLength":20},"oxygenSaturation":{"type":"integer","minimum":50,"maximum":100},"medicationGiven":{"type":"string","maxLength":200},"medicationDose":{"type":"string","maxLength":100},"followUpPlan":{"type":"string","enum":["none","monitor","recheck","physician"]},"parentContacted":{"type":"boolean"}},"required":["studentId","chiefComplaint","disposition"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visit":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"visitAt":{"type":"string","format":"date-time"},"chiefComplaint":{"type":"string"},"disposition":{"type":"string"},"notes":{"type":"string","nullable":true},"durationMinutes":{"type":"integer","nullable":true}},"required":["id","studentPersonId","visitAt","chiefComplaint","disposition","notes","durationMinutes"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["visit","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/visits/{id}":{"get":{"summary":"Get a nurse visit","tags":["Health"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"visitAt":{"type":"string","format":"date-time"},"chiefComplaint":{"type":"string"},"disposition":{"type":"string"},"notes":{"type":"string","nullable":true},"durationMinutes":{"type":"integer","nullable":true}},"required":["id","studentPersonId","visitAt","chiefComplaint","disposition","notes","durationMinutes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/medications":{"get":{"summary":"List medication prescriptions","tags":["Health"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"activeOnly","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a medication prescription","tags":["Health"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"dose":{"type":"string","minLength":1,"maxLength":100},"route":{"type":"string","enum":["oral","topical","injection","inhalation","other"]},"scheduleJson":{"type":"object","properties":{"times":{"type":"array","items":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"default":[]},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"prnReason":{"type":"string","maxLength":300}},"additionalProperties":false,"default":{"times":[]}},"prescriberName":{"type":"string","maxLength":200},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"],"default":"none"},"frequency":{"type":"string","enum":["scheduled","prn"],"default":"scheduled"},"parentConsentOn":{"type":"string","format":"date-time"},"prescriptionOnFile":{"type":"boolean","default":false},"notes":{"type":"string","maxLength":2000}},"required":["studentId","name","dose","route","startDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/medications/due":{"get":{"summary":"Scheduled doses due today","tags":["Health"],"description":"Returns one row per (med × scheduled time) for active scheduled orders today. PRN orders are not included.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"medicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"medicationName":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduledFor":{"type":"string","format":"date-time"},"controlledSubstance":{"type":"string"},"lastDoseAt":{"type":"string","format":"date-time","nullable":true},"alreadyGivenToday":{"type":"boolean"}},"required":["medicationId","studentPersonId","studentName","medicationName","dose","route","scheduledFor","controlledSubstance","lastDoseAt","alreadyGivenToday"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/health/medications/{id}":{"get":{"summary":"Get a medication","tags":["Health"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a medication order (cannot change controlled-substance class)","tags":["Health"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endDate":{"type":"string","format":"date","nullable":true},"scheduleJson":{"type":"object","properties":{"times":{"type":"array","items":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"default":[]},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"prnReason":{"type":"string","maxLength":300}},"additionalProperties":false},"prescriberName":{"type":"string","maxLength":200,"nullable":true},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/medications/{id}/administrations":{"get":{"summary":"Administration history for a medication","tags":["Health"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"medicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"administeredAt":{"type":"string","format":"date-time"},"doseGivenText":{"type":"string"},"administeredByUserId":{"type":"string"},"witnessUserId":{"type":"string","nullable":true},"status":{"type":"string","enum":["given","refused","missed","held"]},"route":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","medicationId","studentPersonId","administeredAt","doseGivenText","administeredByUserId","witnessUserId","status","route","notes","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/medications/{id}/discontinue":{"post":{"summary":"Discontinue a medication order","tags":["Health"],"description":"Flags the order inactive with a reason; further \"due\" rows and new doses are blocked. History remains.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/medications/administrations":{"post":{"summary":"Log a medication administration (emits MedicationAdministered)","tags":["Health"],"description":"Supports status = given | refused | missed | held. Schedule-II controlled meds require a second-nurse `witnessUserId` on any dose with status=given.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"medicationId":{"type":"string","format":"uuid"},"studentId":{"type":"string","format":"uuid"},"administeredAt":{"type":"string","format":"date-time"},"doseGivenText":{"type":"string","minLength":1,"maxLength":100},"witnessUserId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["given","refused","missed","held"],"default":"given"},"route":{"type":"string","enum":["oral","topical","injection","inhalation","other"]},"notes":{"type":"string","maxLength":2000}},"required":["medicationId","studentId","doseGivenText"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"administrationId":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["administrationId","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/medications":{"get":{"summary":"Active medications + recent doses for a guardian's student","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"medications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false}},"recentAdministrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"medicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"administeredAt":{"type":"string","format":"date-time"},"doseGivenText":{"type":"string"},"administeredByUserId":{"type":"string"},"witnessUserId":{"type":"string","nullable":true},"status":{"type":"string","enum":["given","refused","missed","held"]},"route":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","medicationId","studentPersonId","administeredAt","doseGivenText","administeredByUserId","witnessUserId","status","route","notes","createdAt"],"additionalProperties":false}}},"required":["medications","recentAdministrations"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/medications":{"get":{"summary":"The signed-in student's active medications + recent doses","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"medications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"name":{"type":"string"},"dose":{"type":"string"},"route":{"type":"string"},"scheduleJson":{"type":"object","additionalProperties":{}},"prescriberName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"controlledSubstance":{"type":"string","enum":["none","schedule_ii","schedule_iii_v"]},"frequency":{"type":"string","enum":["scheduled","prn"]},"parentConsentOn":{"type":"string","format":"date-time","nullable":true},"prescriptionOnFile":{"type":"boolean"},"discontinuedOn":{"type":"string","format":"date-time","nullable":true},"discontinueReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","studentPersonId","name","dose","route","scheduleJson","prescriberName","startDate","endDate","isActive","controlledSubstance","frequency","parentConsentOn","prescriptionOnFile","discontinuedOn","discontinueReason","notes"],"additionalProperties":false}},"recentAdministrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"medicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"administeredAt":{"type":"string","format":"date-time"},"doseGivenText":{"type":"string"},"administeredByUserId":{"type":"string"},"witnessUserId":{"type":"string","nullable":true},"status":{"type":"string","enum":["given","refused","missed","held"]},"route":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","medicationId","studentPersonId","administeredAt","doseGivenText","administeredByUserId","witnessUserId","status","route","notes","createdAt"],"additionalProperties":false}}},"required":["medications","recentAdministrations"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/screenings":{"get":{"summary":"Recent health screenings for a guardianed student","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"screenings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false}}},"required":["screenings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/screenings":{"get":{"summary":"The signed-in student's recent health screenings","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"screenings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false}}},"required":["screenings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/immunizations":{"get":{"summary":"List immunization records","tags":["Health"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"vaccineCode":{"type":"string"},"vaccineName":{"type":"string"},"administeredOn":{"type":"string","format":"date"},"provider":{"type":"string","nullable":true},"lotNumber":{"type":"string","nullable":true},"doseNumber":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"source":{"type":"string"}},"required":["id","studentPersonId","vaccineCode","vaccineName","administeredOn","provider","lotNumber","doseNumber","notes","source"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record an immunization (emits ImmunizationRecorded)","tags":["Health"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"vaccineCode":{"type":"string","minLength":1,"maxLength":30},"vaccineName":{"type":"string","minLength":1,"maxLength":200},"administeredOn":{"type":"string","format":"date"},"provider":{"type":"string","maxLength":200},"lotNumber":{"type":"string","maxLength":50},"doseNumber":{"type":"integer","minimum":1,"maximum":10},"notes":{"type":"string","maxLength":2000},"source":{"type":"string","enum":["manual","njiis","import"],"default":"manual"}},"required":["studentId","vaccineCode","vaccineName","administeredOn"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"immunization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"vaccineCode":{"type":"string"},"vaccineName":{"type":"string"},"administeredOn":{"type":"string","format":"date"},"provider":{"type":"string","nullable":true},"lotNumber":{"type":"string","nullable":true},"doseNumber":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"source":{"type":"string"}},"required":["id","studentPersonId","vaccineCode","vaccineName","administeredOn","provider","lotNumber","doseNumber","notes","source"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["immunization","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/immunizations/njiis-sync":{"post":{"summary":"Trigger NJIIS immunization sync for this district","tags":["Health"],"description":"Queries NJIIS for all active students, upserts matched vaccination records, detects conflicts with manually-entered data. Credentials must be configured via NJIIS_USERNAME / NJIIS_PASSWORD / NJIIS_FACILITY env vars (or district-scoped equivalents).","responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"syncId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued"]},"message":{"type":"string"}},"required":["syncId","status","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/immunizations/njiis-status":{"get":{"summary":"NJIIS sync status and history for this district","tags":["Health"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lastSyncAt":{"type":"string","format":"date-time","nullable":true},"lastSyncStatus":{"type":"string","nullable":true},"history":{"type":"array","items":{"type":"object","properties":{"startedAt":{"type":"string"},"completedAt":{"type":"string"},"studentsQueried":{"type":"integer"},"studentsMatched":{"type":"integer"},"recordsPulled":{"type":"integer"},"recordsUpserted":{"type":"integer"},"conflictsFound":{"type":"integer"},"failures":{"type":"integer"},"status":{"type":"string"},"error":{"type":"string","nullable":true}},"required":["startedAt","completedAt","studentsQueried","studentsMatched","recordsPulled","recordsUpserted","conflictsFound","failures","status","error"],"additionalProperties":false}}},"required":["lastSyncAt","lastSyncStatus","history"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/health/screenings":{"get":{"summary":"List health screenings","tags":["Health"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"in":"query","name":"type","required":false},{"schema":{"type":"string","enum":["normal","abnormal","inconclusive"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"followupOnly","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a health screening (emits HealthScreeningCompleted)","tags":["Health"],"description":"Status is derived from the result unless explicitly overridden. Abnormal results automatically set followupNeeded=true so the referral queue picks them up.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"notes":{"type":"string","maxLength":2000},"schoolId":{"type":"string","format":"uuid"},"gradeAtScreening":{"type":"string","maxLength":20},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]}},"required":["studentId","screeningType","performedOn","result"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/screenings/compliance":{"get":{"summary":"Screening compliance matrix (who still owes what this year)","tags":["Health"],"description":"Returns one row per (student × required screening) for the current school year. `satisfied` means there is a screening of that type on file since Aug 1. Use to surface a nurse-side \"still to do\" list.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"organizationId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"satisfied":{"type":"boolean"},"mostRecentOn":{"type":"string","format":"date","nullable":true},"mostRecentStatus":{"type":"string","enum":["normal","abnormal","inconclusive"],"nullable":true}},"required":["studentPersonId","studentName","gradeLevel","screeningType","satisfied","mostRecentOn","mostRecentStatus"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/health/screenings/{id}":{"get":{"summary":"Get a screening","tags":["Health"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a screening (correct a typo, update notes, override status)","tags":["Health"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","additionalProperties":{}},"notes":{"type":"string","maxLength":2000,"nullable":true},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/screenings/{id}/referral":{"post":{"summary":"Record that a family referral was sent for an abnormal screening","tags":["Health"],"description":"Stamps `referralSentOn` and appends a note. Emits ScreeningReferralSent. Only valid on screenings where followupNeeded=true.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","minLength":3,"maxLength":2000},"sentOn":{"type":"string","format":"date"}},"required":["notes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"screeningType":{"type":"string","enum":["vision","hearing","scoliosis","bmi","blood_pressure"]},"performedOn":{"type":"string","format":"date"},"result":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["normal","abnormal","inconclusive"]},"followupNeeded":{"type":"boolean"},"schoolId":{"type":"string","format":"uuid","nullable":true},"performedByUserId":{"type":"string","nullable":true},"gradeAtScreening":{"type":"string","nullable":true},"referralSentOn":{"type":"string","format":"date-time","nullable":true},"referralNotes":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"studentName":{"type":"string","nullable":true}},"required":["id","studentPersonId","screeningType","performedOn","result","status","followupNeeded","schoolId","performedByUserId","gradeAtScreening","referralSentOn","referralNotes","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents":{"get":{"summary":"List discipline incidents","tags":["Discipline"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["open","pending_review","closed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"offenseCode":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"hibBias":{"type":"array","items":{"type":"string"},"nullable":true},"hibBoardReport":{"type":"boolean","nullable":true},"injuryLevel":{"type":"string","nullable":true},"injuryDescription":{"type":"string","nullable":true},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","nullable":true},"witnessStatements":{"type":"string","nullable":true},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","nullable":true},"notifyAt":{"type":"string","format":"date-time","nullable":true},"notifyBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentDate","location","offenseCode","description","status","hibBias","hibBoardReport","injuryLevel","injuryDescription","policeInvolved","policeReportNumber","witnessStatements","parentNotified","notifyMethod","notifyAt","notifyBy","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a discipline incident (emits IncidentReported)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","maxLength":200},"offenseCode":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","minLength":1,"maxLength":5000},"participants":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["offender","victim","witness","reporter"]}},"required":["studentId","role"],"additionalProperties":false},"minItems":1,"maxItems":50},"hibBias":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"hibBoardReport":{"type":"boolean"},"injuryLevel":{"type":"string","maxLength":30},"injuryDescription":{"type":"string","maxLength":500},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","maxLength":50},"witnessStatements":{"type":"string","maxLength":5000},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","maxLength":30},"notifyAt":{"type":"string","format":"date-time"},"notifyBy":{"type":"string","maxLength":200}},"required":["incidentDate","offenseCode","description","participants"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"offenseCode":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"hibBias":{"type":"array","items":{"type":"string"},"nullable":true},"hibBoardReport":{"type":"boolean","nullable":true},"injuryLevel":{"type":"string","nullable":true},"injuryDescription":{"type":"string","nullable":true},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","nullable":true},"witnessStatements":{"type":"string","nullable":true},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","nullable":true},"notifyAt":{"type":"string","format":"date-time","nullable":true},"notifyBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentDate","location","offenseCode","description","status","hibBias","hibBoardReport","injuryLevel","injuryDescription","policeInvolved","policeReportNumber","witnessStatements","parentNotified","notifyMethod","notifyAt","notifyBy","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"},"hibInvestigationId":{"type":"string","format":"uuid","nullable":true}},"required":["incident","eventId","hibInvestigationId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}":{"get":{"summary":"Get an incident with participants and actions","tags":["Discipline"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"offenseCode":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"hibBias":{"type":"array","items":{"type":"string"},"nullable":true},"hibBoardReport":{"type":"boolean","nullable":true},"injuryLevel":{"type":"string","nullable":true},"injuryDescription":{"type":"string","nullable":true},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","nullable":true},"witnessStatements":{"type":"string","nullable":true},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","nullable":true},"notifyAt":{"type":"string","format":"date-time","nullable":true},"notifyBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentDate","location","offenseCode","description","status","hibBias","hibBoardReport","injuryLevel","injuryDescription","policeInvolved","policeReportNumber","witnessStatements","parentNotified","notifyMethod","notifyAt","notifyBy","createdAt","updatedAt"],"additionalProperties":false},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"role":{"type":"string","enum":["offender","victim","witness","reporter"]}},"required":["id","incidentId","studentPersonId","studentName","gradeLevel","role"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string","nullable":true},"actionType":{"type":"string"},"durationDays":{"type":"integer","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","incidentId","studentPersonId","studentName","actionType","durationDays","startDate","endDate","notes"],"additionalProperties":false}},"hib":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false,"nullable":true}},"required":["incident","participants","actions","hib"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit an incident, log parent notification, close or reopen it (emits IncidentUpdated)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","pending_review","closed"]},"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","maxLength":200,"nullable":true},"offenseCode":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","minLength":1,"maxLength":5000},"hibBias":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20,"nullable":true},"hibBoardReport":{"type":"boolean","nullable":true},"injuryLevel":{"type":"string","maxLength":30,"nullable":true},"injuryDescription":{"type":"string","maxLength":500,"nullable":true},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","maxLength":50,"nullable":true},"witnessStatements":{"type":"string","maxLength":5000,"nullable":true},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","maxLength":30,"nullable":true},"notifyAt":{"type":"string","format":"date-time","nullable":true},"notifyBy":{"type":"string","maxLength":200,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentDate":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"offenseCode":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"hibBias":{"type":"array","items":{"type":"string"},"nullable":true},"hibBoardReport":{"type":"boolean","nullable":true},"injuryLevel":{"type":"string","nullable":true},"injuryDescription":{"type":"string","nullable":true},"policeInvolved":{"type":"boolean"},"policeReportNumber":{"type":"string","nullable":true},"witnessStatements":{"type":"string","nullable":true},"parentNotified":{"type":"boolean"},"notifyMethod":{"type":"string","nullable":true},"notifyAt":{"type":"string","format":"date-time","nullable":true},"notifyBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentDate","location","offenseCode","description","status","hibBias","hibBoardReport","injuryLevel","injuryDescription","policeInvolved","policeReportNumber","witnessStatements","parentNotified","notifyMethod","notifyAt","notifyBy","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/actions":{"post":{"summary":"Assign a consequence (emits IncidentActionAssigned)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"actionType":{"type":"string","enum":["verbal_warning","detention","iss","oss","referral","expulsion_hearing","counseling","other"]},"durationDays":{"type":"integer","minimum":0,"maximum":365},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":2000}},"required":["studentId","actionType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string","nullable":true},"actionType":{"type":"string"},"durationDays":{"type":"integer","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","incidentId","studentPersonId","studentName","actionType","durationDays","startDate","endDate","notes"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["action","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/participants":{"post":{"summary":"Add a student to an incident (emits IncidentParticipantAdded)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["offender","victim","witness","reporter"]}},"required":["studentId","role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"role":{"type":"string","enum":["offender","victim","witness","reporter"]}},"required":["id","incidentId","studentPersonId","studentName","gradeLevel","role"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hib/policy":{"get":{"summary":"Resolve the district's effective HIB policy (state default + district overrides).","tags":["Discipline"],"description":"Returns the policy code, deadline (school-days or calendar-days), recognized outcomes, bias categories, and notification checklist for the current district. When the district's state has no HIB statute, `disabled` is true and the feature is inert.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"disabled":{"type":"boolean"},"source":{"type":"string","enum":["district-override","state-default","fallback-generic"]},"usedFallback":{"type":"boolean"},"requestedCode":{"type":"string","nullable":true},"policy":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string"},"specRef":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"investigationDeadline":{"type":"object","properties":{"type":{"type":"string","enum":["school-days","calendar-days"]},"days":{"type":"integer"},"specRef":{"type":"string"}},"required":["type","days"],"additionalProperties":false},"outcomes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"triggersRemediation":{"type":"boolean"}},"required":["code","label","triggersRemediation"],"additionalProperties":false}},"biasCategories":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"statutory":{"type":"boolean"}},"required":["code","label","statutory"],"additionalProperties":false}},"notifications":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"dueWithin":{"type":"object","properties":{"type":{"type":"string","enum":["school-days","calendar-days"]},"days":{"type":"integer"}},"required":["type","days"],"additionalProperties":false},"audience":{"type":"string","enum":["parents-victim","parents-aggressor","board","superintendent","state"]}},"required":["code","label","audience"],"additionalProperties":false}},"reportingCadences":{"type":"array","items":{"type":"object","properties":{"audience":{"type":"string","enum":["board","state","public"]},"frequency":{"type":"string","enum":["monthly","quarterly","biannual","annual"]},"specRef":{"type":"string"},"description":{"type":"string"}},"required":["audience","frequency"],"additionalProperties":false}},"requiresSpecialist":{"type":"boolean"},"reviewedYear":{"type":"integer"}},"required":["code","name","jurisdiction","specRef","href","description","investigationDeadline","outcomes","biasCategories","notifications","reportingCadences","requiresSpecialist","reviewedYear"],"additionalProperties":false},"effectiveDeadline":{"type":"object","properties":{"type":{"type":"string","enum":["school-days","calendar-days"]},"days":{"type":"integer"},"specRef":{"type":"string"}},"required":["type","days"],"additionalProperties":false},"effectiveBiasCategories":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"statutory":{"type":"boolean"}},"required":["code","label","statutory"],"additionalProperties":false}}},"required":["disabled","source","usedFallback","requestedCode","policy","effectiveDeadline","effectiveBiasCategories"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/hib/policy/catalog":{"get":{"summary":"List all built-in HIB policies in the Forge catalog.","tags":["Discipline"],"description":"Surfaces every policy definition shipped with the product — the admin UI picker uses this to show the full option set to districts setting an override.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string"},"specRef":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"investigationDeadline":{"type":"object","properties":{"type":{"type":"string","enum":["school-days","calendar-days"]},"days":{"type":"integer"},"specRef":{"type":"string"}},"required":["type","days"],"additionalProperties":false},"outcomes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"triggersRemediation":{"type":"boolean"}},"required":["code","label","triggersRemediation"],"additionalProperties":false}},"biasCategories":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"statutory":{"type":"boolean"}},"required":["code","label","statutory"],"additionalProperties":false}},"notifications":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"dueWithin":{"type":"object","properties":{"type":{"type":"string","enum":["school-days","calendar-days"]},"days":{"type":"integer"}},"required":["type","days"],"additionalProperties":false},"audience":{"type":"string","enum":["parents-victim","parents-aggressor","board","superintendent","state"]}},"required":["code","label","audience"],"additionalProperties":false}},"reportingCadences":{"type":"array","items":{"type":"object","properties":{"audience":{"type":"string","enum":["board","state","public"]},"frequency":{"type":"string","enum":["monthly","quarterly","biannual","annual"]},"specRef":{"type":"string"},"description":{"type":"string"}},"required":["audience","frequency"],"additionalProperties":false}},"requiresSpecialist":{"type":"boolean"},"reviewedYear":{"type":"integer"}},"required":["code","name","jurisdiction","specRef","href","description","investigationDeadline","outcomes","biasCategories","notifications","reportingCadences","requiresSpecialist","reviewedYear"],"additionalProperties":false}}},"required":["policies"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/hib-investigations":{"get":{"summary":"List HIB investigations","tags":["Discipline"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["open","completed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open an HIB investigation against an existing incident (emits HibInvestigationOpened)","tags":["Discipline"],"description":"Deadline is computed from the district's resolved HIB policy — school-days when a district calendar feed is available, calendar-day approximation otherwise. `deadlineApproximate` on the response flags when the UI should warn that the deadline is an approximation.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"}},"required":["incidentId","investigatorId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"hib":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"},"deadlineApproximate":{"type":"boolean"}},"required":["hib","eventId","deadlineApproximate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hib-investigations/{id}":{"get":{"summary":"Get an HIB investigation","tags":["Discipline"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Record HIB milestones, findings, remedial actions or an appeal","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"investigatorId":{"type":"string","format":"uuid"},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"findings":{"type":"string","maxLength":10000,"nullable":true},"remedialActions":{"type":"string","maxLength":10000,"nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","enum":["upheld","overturned","modified"],"nullable":true},"appealNotes":{"type":"string","maxLength":10000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hib-investigations/{id}/complete":{"post":{"summary":"Close an HIB investigation (emits HibInvestigationCompleted)","tags":["Discipline"],"description":"The outcome must be one recognized by the district's resolved HIB policy. Unknown outcomes return a 422 with the list of valid codes.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","minLength":1,"maxLength":40},"documentUrl":{"type":"string","format":"uri"},"findings":{"type":"string","maxLength":10000},"remedialActions":{"type":"string","maxLength":10000}},"required":["outcome"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"hib":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"investigatorId":{"type":"string","format":"uuid"},"investigatorName":{"type":"string","nullable":true},"deadline":{"type":"string","format":"date"},"deadlineApproximate":{"type":"boolean"},"status":{"type":"string"},"outcome":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"reportedToPrincipalAt":{"type":"string","format":"date-time","nullable":true},"superintendentDeadline":{"type":"string","format":"date","nullable":true},"superintendentReportedAt":{"type":"string","format":"date-time","nullable":true},"boardMeetingDate":{"type":"string","format":"date","nullable":true},"boardReportedAt":{"type":"string","format":"date-time","nullable":true},"parentOutcomeDeadline":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","nullable":true},"remedialActions":{"type":"string","nullable":true},"appealRequestedAt":{"type":"string","format":"date-time","nullable":true},"appealHeardAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"appealNotes":{"type":"string","nullable":true},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false}}},"required":["id","incidentId","investigatorId","deadline","deadlineApproximate","status","outcome","documentUrl","completedAt","reportedToPrincipalAt","superintendentDeadline","superintendentReportedAt","boardMeetingDate","boardReportedAt","parentOutcomeDeadline","findings","remedialActions","appealRequestedAt","appealHeardAt","appealOutcome","appealNotes"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["hib","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hib-investigations/{id}/notifications":{"post":{"summary":"Log a required HIB notice (guardians, superintendent, board)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["initial_report","investigation_started","outcome","appeal_rights","other"]},"party":{"type":"string","enum":["victim_guardian","aggressor_guardian","superintendent","board","other"]},"method":{"type":"string","enum":["phone","email","letter","meeting","portal"]},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":5000}},"required":["kind","party","method"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"party":{"type":"string"},"method":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"sentBy":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","party","method","sentAt","sentBy","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/restraint-seclusion":{"post":{"summary":"Log a restraint or seclusion event (emits RestraintSeclusionLogged)","tags":["Discipline"],"description":"NJ-reportable event; the audit log retains this record indefinitely. Witnesses are recorded as person ids.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["physical_restraint","seclusion","mechanical_restraint"]},"durationSeconds":{"type":"integer","minimum":1,"maximum":86400},"witnesses":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":0,"maxItems":20},"notes":{"type":"string","maxLength":2000}},"required":["studentId","type","durationSeconds","witnesses"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/escalations":{"get":{"summary":"List escalations for a discipline incident","tags":["Discipline"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open a formal escalation for an incident (emits DisciplineEscalationOpened)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":5000},"hearingScheduledAt":{"type":"string","format":"date-time"},"appealDeadline":{"type":"string","format":"date"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/escalations/{escId}":{"patch":{"summary":"Update an escalation — schedule/hold hearing, record outcome, set sanction","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hearingScheduledAt":{"type":"string","format":"date-time"},"hearingHeldAt":{"type":"string","format":"date-time"},"hearingNotes":{"type":"string","maxLength":5000},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","minimum":0,"maximum":365},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":5000},"appealDeadline":{"type":"string","format":"date"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"escId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/escalations/{escId}/notice":{"post":{"summary":"Record that a parent notice was issued (emits EscalationNoticeIssued)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"noticeMethod":{"type":"string","enum":["letter","phone","email","portal"]},"issuedAt":{"type":"string","format":"date-time"}},"required":["noticeMethod"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"escId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/incidents/{id}/escalations/{escId}/appeal":{"post":{"summary":"File a family appeal of the escalation outcome (emits DisciplineAppealFiled)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"appealDeadline":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"escId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Record the appeal decision (emits DisciplineAppealDecided)","tags":["Discipline"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"appealOutcome":{"type":"string","enum":["affirmed","reversed","withdrawn"]},"notes":{"type":"string","maxLength":2000}},"required":["appealOutcome"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"escId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"incidentId":{"type":"string","format":"uuid"},"openedByPersonId":{"type":"string","format":"uuid","nullable":true},"openedAt":{"type":"string","format":"date-time"},"hearingScheduledAt":{"type":"string","format":"date-time","nullable":true},"hearingHeldAt":{"type":"string","format":"date-time","nullable":true},"hearingNotes":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pending","dismissed","sustained","expulsion_recommended"]},"sanctionType":{"type":"string","enum":["none","verbal_warning","suspension","expulsion","other"]},"suspensionDays":{"type":"integer","nullable":true},"expulsionRecommended":{"type":"boolean"},"returnDate":{"type":"string","format":"date","nullable":true},"parentNoticeIssuedAt":{"type":"string","format":"date-time","nullable":true},"parentNoticeMethod":{"type":"string","nullable":true},"appealDeadline":{"type":"string","format":"date","nullable":true},"appealFiledAt":{"type":"string","format":"date-time","nullable":true},"appealOutcome":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","incidentId","openedByPersonId","openedAt","hearingScheduledAt","hearingHeldAt","hearingNotes","outcome","sanctionType","suspensionDays","expulsionRecommended","returnDate","parentNoticeIssuedAt","parentNoticeMethod","appealDeadline","appealFiledAt","appealOutcome","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/messages":{"get":{"summary":"List messages sent from this district","tags":["Communications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["email","sms","push","voice"]},"in":"query","name":"channel","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel":{"type":"string"},"templateId":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"recipientCount":{"type":"integer"},"deliveryStatus":{"type":"object","additionalProperties":{}}},"required":["id","channel","templateId","subject","body","sentAt","recipientCount","deliveryStatus"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Send a message (one-to-many) via the worker (emits CommunicationSent)","tags":["Communications"],"description":"Records a row in `communications`, enqueues a send-notification job, and emits CommunicationSent. Actual delivery happens in the notifications worker; check delivery status via GET /v1/messages/:id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms","push","voice"]},"subject":{"type":"string","maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"templateId":{"type":"string","minLength":1,"maxLength":100},"templateData":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"recipients":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":30},"displayName":{"type":"string","maxLength":200}},"additionalProperties":false},"minItems":1,"maxItems":1000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["channel","body","recipients"],"additionalProperties":false}}},"required":true},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"queued":{"type":"integer"},"eventId":{"type":"string","format":"uuid"}},"required":["messageId","queued","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/messages/{id}":{"get":{"summary":"Message detail with per-recipient delivery receipts","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel":{"type":"string"},"templateId":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"recipientCount":{"type":"integer"},"deliveryStatus":{"type":"object","additionalProperties":{}},"priority":{"type":"string"},"sendMode":{"type":"string"},"scheduledFor":{"type":"string","format":"date-time","nullable":true},"requireAck":{"type":"boolean"},"receiptCounts":{"type":"object","additionalProperties":{"type":"integer"}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"personId":{"type":"string","nullable":true},"providerMessageId":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"statusAt":{"type":"string","format":"date-time"}},"required":["id","channel","address","status","personId","providerMessageId","error","statusAt"],"additionalProperties":false}}},"required":["id","channel","templateId","subject","body","sentAt","recipientCount","deliveryStatus","priority","sendMode","scheduledFor","requireAck","receiptCounts","receipts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/broadcasts":{"post":{"summary":"Emergency or district-wide broadcast to a named audience","tags":["Communications"],"description":"Resolves the audience to a recipient list at send time, records one Communication row, enqueues the notification job (or defers it when scheduled), and emits CommunicationSent. Requires broadcast.send permission.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms","push","voice"]},"subject":{"type":"string","maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"templateId":{"type":"string","minLength":1,"maxLength":100},"templateData":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"audience":{"type":"string","enum":["all_guardians","all_staff","all_students","by_grade","by_school"]},"priority":{"type":"string","enum":["normal","high","urgent","emergency"],"default":"normal"},"sendMode":{"type":"string","enum":["now","scheduled"],"default":"now"},"scheduledFor":{"type":"string","format":"date-time"},"requireAck":{"type":"boolean","default":false},"targetGrade":{"type":"string","maxLength":10},"targetSchool":{"type":"string","format":"uuid"},"includeGuardians":{"type":"boolean","default":true},"includeStudents":{"type":"boolean","default":false},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["channel","body","audience"],"additionalProperties":false}}},"required":true},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"queued":{"type":"integer"},"eventId":{"type":"string","format":"uuid"}},"required":["messageId","queued","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/templates":{"get":{"summary":"List message templates","tags":["Communications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["email","sms","push","voice"]},"in":"query","name":"channel","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"placeholders":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}},"required":["id","code","name","channel","subject","body","placeholders","isActive"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a message template","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","enum":["email","sms","push","voice"]},"subject":{"type":"string","maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"placeholders":{"type":"array","items":{"type":"string","maxLength":50},"default":[]},"isActive":{"type":"boolean","default":true}},"required":["code","name","channel","body"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"placeholders":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}},"required":["id","code","name","channel","subject","body","placeholders","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/templates/{id}":{"get":{"summary":"Get a message template","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"placeholders":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}},"required":["id","code","name","channel","subject","body","placeholders","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a message template","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","enum":["email","sms","push","voice"]},"subject":{"type":"string","maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"placeholders":{"type":"array","items":{"type":"string","maxLength":50},"default":[]},"isActive":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"placeholders":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}},"required":["id","code","name","channel","subject","body","placeholders","isActive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/comms/settings":{"get":{"summary":"Get communications provider settings (masked — no credentials returned)","tags":["Communications"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"emailProvider":{"type":"object","properties":{"name":{"type":"string"},"configured":{"type":"boolean"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"webhookToken":{"type":"string","format":"uuid"}},"required":["name","configured"],"additionalProperties":false},"smsProvider":{"type":"object","properties":{"name":{"type":"string"},"configured":{"type":"boolean"},"fromNumber":{"type":"string"}},"required":["name","configured"],"additionalProperties":false},"suppressionCount":{"type":"integer"}},"required":["emailProvider","smsProvider","suppressionCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update email / SMS provider configuration","tags":["Communications"],"description":"Writes email and/or SMS provider credentials into District.settings.comms. Credentials (API keys, auth tokens) are write-only — omit them to keep existing values unchanged. A webhook token is generated automatically for SendGrid on first save.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailProvider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","enum":["sendgrid"]},"apiKey":{"type":"string","minLength":1},"fromEmail":{"type":"string","format":"email"},"fromName":{"type":"string","maxLength":100}},"required":["name","fromEmail"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["none"]}},"required":["name"],"additionalProperties":false}]},"smsProvider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","enum":["twilio"]},"accountSid":{"type":"string","minLength":1},"authToken":{"type":"string","minLength":1},"fromNumber":{"type":"string","minLength":1}},"required":["name","fromNumber"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","enum":["none"]}},"required":["name"],"additionalProperties":false}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"emailProvider":{"type":"object","properties":{"name":{"type":"string"},"configured":{"type":"boolean"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"webhookToken":{"type":"string","format":"uuid"}},"required":["name","configured"],"additionalProperties":false},"smsProvider":{"type":"object","properties":{"name":{"type":"string"},"configured":{"type":"boolean"},"fromNumber":{"type":"string"}},"required":["name","configured"],"additionalProperties":false},"suppressionCount":{"type":"integer"}},"required":["emailProvider","smsProvider","suppressionCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/comms/settings/suppressions":{"delete":{"summary":"Clear the bounce/unsubscribe suppression list (or remove one address)","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"email"},"in":"query","name":"address","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"integer"}},"required":["removed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements":{"get":{"summary":"List announcements (all statuses) with read/ack counts","tags":["Communications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["draft","published","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["general","emergency","event","academic","athletics","operations"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"readCount":{"type":"integer"},"ackCount":{"type":"integer"}},"required":["id","schoolId","title","body","category","status","pinned","requireAck","audience","publishAt","expiresAt","createdByUserId","createdAt","readCount","ackCount"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a draft announcement (emits AnnouncementCreated)","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"category":{"type":"string","enum":["general","emergency","event","academic","athletics","operations"],"default":"general"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false,"default":{}},"schoolId":{"type":"string","format":"uuid"},"pinned":{"type":"boolean","default":false},"requireAck":{"type":"boolean","default":false},"publishAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["title","body"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"readCount":{"type":"integer"},"ackCount":{"type":"integer"}},"required":["id","schoolId","title","body","category","status","pinned","requireAck","audience","publishAt","expiresAt","createdByUserId","createdAt","readCount","ackCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/{id}":{"patch":{"summary":"Update an announcement","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":20000},"category":{"type":"string","enum":["general","emergency","event","academic","athletics","operations"],"default":"general"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false,"default":{}},"schoolId":{"type":"string","format":"uuid"},"pinned":{"type":"boolean","default":false},"requireAck":{"type":"boolean","default":false},"publishAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"readCount":{"type":"integer"},"ackCount":{"type":"integer"}},"required":["id","schoolId","title","body","category","status","pinned","requireAck","audience","publishAt","expiresAt","createdByUserId","createdAt","readCount","ackCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/{id}/publish":{"post":{"summary":"Publish an announcement (emits AnnouncementPublished)","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"readCount":{"type":"integer"},"ackCount":{"type":"integer"}},"required":["id","schoolId","title","body","category","status","pinned","requireAck","audience","publishAt","expiresAt","createdByUserId","createdAt","readCount","ackCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/{id}/archive":{"post":{"summary":"Archive an announcement (emits AnnouncementArchived)","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"audience":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30},"schoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"grades":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":20}},"additionalProperties":false},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"readCount":{"type":"integer"},"ackCount":{"type":"integer"}},"required":["id","schoolId","title","body","category","status","pinned","requireAck","audience","publishAt","expiresAt","createdByUserId","createdAt","readCount","ackCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/feed":{"get":{"summary":"Published announcements for the signed-in user (pinned first)","tags":["Communications"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"publishAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"readAt":{"type":"string","format":"date-time","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","title","body","category","pinned","requireAck","publishAt","expiresAt","readAt","acknowledgedAt"],"additionalProperties":false}},"unreadCount":{"type":"integer"}},"required":["items","unreadCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/{id}/read":{"post":{"summary":"Mark an announcement read for the signed-in user","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"announcementId":{"type":"string","format":"uuid"},"readAt":{"type":"string","format":"date-time","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true}},"required":["announcementId","readAt","acknowledgedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/announcements/{id}/acknowledge":{"post":{"summary":"Acknowledge an announcement (emits AnnouncementAcknowledged)","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"announcementId":{"type":"string","format":"uuid"},"readAt":{"type":"string","format":"date-time","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true}},"required":["announcementId","readAt","acknowledgedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/conversations":{"get":{"summary":"List the caller's conversation threads (newest first)","tags":["Communications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["open","closed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"status":{"type":"string"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"studentName":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"lastMessageAt":{"type":"string","format":"date-time"},"unread":{"type":"boolean"},"lastMessageSnippet":{"type":"string","nullable":true},"participants":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"role":{"type":"string"},"lastReadAt":{"type":"string","format":"date-time","nullable":true}},"required":["userId","displayName","role","lastReadAt"],"additionalProperties":false}}},"required":["id","subject","status","studentPersonId","studentName","createdByUserId","lastMessageAt","unread","lastMessageSnippet","participants"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a conversation (emits ConversationStarted + ConversationMessageSent)","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":10000},"participantUserIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":20},"studentPersonId":{"type":"string","format":"uuid"}},"required":["subject","body","participantUserIds"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["conversationId","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/conversations/recipients":{"get":{"summary":"Who the caller may start a conversation with","tags":["Communications"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"callerType":{"type":"string","enum":["staff","parent"]},"recipients":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"kind":{"type":"string","enum":["staff","guardian"]},"roleLabels":{"type":"array","items":{"type":"string"}}},"required":["userId","displayName","kind","roleLabels"],"additionalProperties":false}}},"required":["callerType","recipients"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/conversations/{id}":{"get":{"summary":"Full thread (participants only) — marks the thread read","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"status":{"type":"string"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"studentName":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"lastMessageAt":{"type":"string","format":"date-time"},"participants":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"role":{"type":"string"},"lastReadAt":{"type":"string","format":"date-time","nullable":true}},"required":["userId","displayName","role","lastReadAt"],"additionalProperties":false}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"senderUserId":{"type":"string"},"senderName":{"type":"string"},"body":{"type":"string"},"sentAt":{"type":"string","format":"date-time"}},"required":["id","senderUserId","senderName","body","sentAt"],"additionalProperties":false}}},"required":["id","subject","status","studentPersonId","studentName","createdByUserId","lastMessageAt","participants","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/conversations/{id}/messages":{"post":{"summary":"Append a message (participants only, emits ConversationMessageSent)","tags":["Communications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["messageId","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/conversations/{id}/close":{"post":{"summary":"Close a conversation (creator or comms.admin)","tags":["Communications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/webhooks/sendgrid/{districtId}":{"post":{"tags":["Webhooks"],"description":"SendGrid delivery webhook (token-authed via ?tok=).","parameters":[{"schema":{"type":"string"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/webhooks/resend/{districtId}":{"post":{"tags":["Webhooks"],"description":"Resend email events webhook (token-authed via ?tok=).","parameters":[{"schema":{"type":"string"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/webhooks/twilio/{districtId}":{"post":{"tags":["Webhooks"],"description":"Twilio status webhook (HMAC-SHA1 authed).","parameters":[{"schema":{"type":"string"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/compliance/rules":{"get":{"summary":"List the compliance rules for this district's state","tags":["Compliance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"jurisdiction":{"type":"string"},"category":{"type":"string"},"specRef":{"type":"string"},"severity":{"type":"string","enum":["info","warn","blocker"]},"description":{"type":"string"}},"required":["id","version","jurisdiction","category","specRef","severity","description"],"additionalProperties":false}},"state":{"type":"string","nullable":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","state","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/rules/run":{"post":{"summary":"Evaluate the district state's rules and persist findings","tags":["Compliance"],"description":"Runs every rule in the district state's rule set, persists findings into compliance_findings (upsert + auto-resolve stale), and returns the consolidated report with persisted counts.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"asOf":{"type":"string","format":"date-time"},"state":{"type":"string","nullable":true},"findingsBySeverity":{"type":"object","properties":{"info":{"type":"integer"},"warn":{"type":"integer"},"blocker":{"type":"integer"}},"required":["info","warn","blocker"],"additionalProperties":false},"findingsByRule":{"type":"object","additionalProperties":{"type":"integer"}},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"ruleVersion":{"type":"integer"},"severity":{"type":"string","enum":["info","warn","blocker"]},"subjectType":{"type":"string"},"subjectId":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ruleId","ruleVersion","severity","subjectType","subjectId","message"],"additionalProperties":false}},"persisted":{"type":"object","properties":{"inserted":{"type":"integer"},"updated":{"type":"integer"},"resolved":{"type":"integer"}},"required":["inserted","updated","resolved"],"additionalProperties":false}},"required":["districtId","asOf","state","findingsBySeverity","findingsByRule","findings","persisted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/custom-rules":{"get":{"summary":"List district-authored custom rules (incl. disabled)","tags":["Compliance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","nullable":true},"subject":{"type":"string"},"field":{"type":"string","nullable":true},"operator":{"type":"string"},"value":{"type":"string","nullable":true},"gradeFilter":{"type":"string","nullable":true},"messageTemplate":{"type":"string"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","category","severity","specRef","subject","field","operator","value","gradeFilter","messageTemplate","enabled","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a district custom rule","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","maxLength":50,"default":"custom"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","maxLength":120,"nullable":true},"subject":{"type":"string","enum":["student_metric","immunization"]},"field":{"type":"string","maxLength":60,"nullable":true},"operator":{"type":"string","enum":["lt","lte","gt","gte","eq","neq","missing"]},"value":{"type":"string","maxLength":200,"nullable":true},"gradeFilter":{"type":"string","maxLength":5,"nullable":true},"messageTemplate":{"type":"string","minLength":1,"maxLength":2000},"enabled":{"type":"boolean","default":true}},"required":["name","severity","subject","operator","messageTemplate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","nullable":true},"subject":{"type":"string"},"field":{"type":"string","nullable":true},"operator":{"type":"string"},"value":{"type":"string","nullable":true},"gradeFilter":{"type":"string","nullable":true},"messageTemplate":{"type":"string"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","category","severity","specRef","subject","field","operator","value","gradeFilter","messageTemplate","enabled","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/custom-rules/{id}":{"patch":{"summary":"Update a district custom rule","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","maxLength":50,"default":"custom"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","maxLength":120,"nullable":true},"subject":{"type":"string","enum":["student_metric","immunization"]},"field":{"type":"string","maxLength":60,"nullable":true},"operator":{"type":"string","enum":["lt","lte","gt","gte","eq","neq","missing"]},"value":{"type":"string","maxLength":200,"nullable":true},"gradeFilter":{"type":"string","maxLength":5,"nullable":true},"messageTemplate":{"type":"string","minLength":1,"maxLength":2000},"enabled":{"type":"boolean","default":true}},"required":["name","severity","subject","operator","messageTemplate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","nullable":true},"subject":{"type":"string"},"field":{"type":"string","nullable":true},"operator":{"type":"string"},"value":{"type":"string","nullable":true},"gradeFilter":{"type":"string","nullable":true},"messageTemplate":{"type":"string"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","category","severity","specRef","subject","field","operator","value","gradeFilter","messageTemplate","enabled","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a custom rule (and its open findings)","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"category":{"type":"string"},"severity":{"type":"string","enum":["info","warn","blocker"]},"specRef":{"type":"string","nullable":true},"subject":{"type":"string"},"field":{"type":"string","nullable":true},"operator":{"type":"string"},"value":{"type":"string","nullable":true},"gradeFilter":{"type":"string","nullable":true},"messageTemplate":{"type":"string"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","category","severity","specRef","subject","field","operator","value","gradeFilter","messageTemplate","enabled","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings":{"get":{"summary":"List persisted compliance findings","tags":["Compliance"],"parameters":[{"schema":{"type":"string","enum":["open","resolved","all"],"default":"open"},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["info","warn","blocker"]},"in":"query","name":"severity","required":false},{"schema":{"type":"string"},"in":"query","name":"ruleId","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectType","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"ruleId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warn","blocker"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{},"nullable":true},"foundAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"resolvedByUserId":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true},"status":{"type":"string"},"assigneeUserId":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"noteCount":{"type":"integer"}},"required":["id","districtId","ruleId","subjectType","subjectId","subjectName","severity","message","details","foundAt","resolvedAt","resolvedByUserId","resolution","status","assigneeUserId","assigneeName","noteCount"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings/summary":{"get":{"summary":"Open-finding counts by severity/rule + score trend","tags":["Compliance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"bySeverity":{"type":"object","properties":{"info":{"type":"integer"},"warn":{"type":"integer"},"blocker":{"type":"integer"}},"required":["info","warn","blocker"],"additionalProperties":false},"byRule":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"count":{"type":"integer"}},"required":["ruleId","count"],"additionalProperties":false}},"totalOpen":{"type":"integer"},"latestScorePct":{"type":"integer","nullable":true},"trend":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"scorePct":{"type":"integer"}},"required":["date","scorePct"],"additionalProperties":false}}},"required":["bySeverity","byRule","totalOpen","latestScorePct","trend"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings/{id}/resolve":{"post":{"summary":"Resolve a finding with a required resolution note","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","minLength":1,"maxLength":2000}},"required":["resolution"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"ruleId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warn","blocker"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{},"nullable":true},"foundAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"resolvedByUserId":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true},"status":{"type":"string"},"assigneeUserId":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"noteCount":{"type":"integer"}},"required":["id","districtId","ruleId","subjectType","subjectId","subjectName","severity","message","details","foundAt","resolvedAt","resolvedByUserId","resolution","status","assigneeUserId","assigneeName","noteCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings/{id}/reopen":{"post":{"summary":"Reopen a previously-resolved finding","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"ruleId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warn","blocker"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{},"nullable":true},"foundAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"resolvedByUserId":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true},"status":{"type":"string"},"assigneeUserId":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"noteCount":{"type":"integer"}},"required":["id","districtId","ruleId","subjectType","subjectId","subjectName","severity","message","details","foundAt","resolvedAt","resolvedByUserId","resolution","status","assigneeUserId","assigneeName","noteCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings/{id}":{"patch":{"summary":"Update a finding’s review status and/or assignee","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress"]},"assigneeUserId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"ruleId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warn","blocker"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{},"nullable":true},"foundAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"resolvedByUserId":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true},"status":{"type":"string"},"assigneeUserId":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"noteCount":{"type":"integer"}},"required":["id","districtId","ruleId","subjectType","subjectId","subjectName","severity","message","details","foundAt","resolvedAt","resolvedByUserId","resolution","status","assigneeUserId","assigneeName","noteCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/findings/{id}/notes":{"get":{"summary":"List the progress-notes trail for a finding","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"body":{"type":"string"},"authorUserId":{"type":"string","nullable":true},"authorName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","body","authorUserId","authorName","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Append a progress note to a finding","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"body":{"type":"string"},"authorUserId":{"type":"string","nullable":true},"authorName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","body","authorUserId","authorName","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/tasks":{"get":{"summary":"List compliance tasks","tags":["Compliance"],"parameters":[{"schema":{"type":"string","enum":["open","in_progress","completed","cancelled","active","all"],"default":"active"},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"assignedToPersonId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"detail":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueDate":{"type":"string","format":"date","nullable":true},"assignedToPersonId":{"type":"string","nullable":true},"assignedToName":{"type":"string","nullable":true},"createdByPersonId":{"type":"string","nullable":true},"source":{"type":"string"},"reportType":{"type":"string","nullable":true},"submissionId":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"overdue":{"type":"boolean"}},"required":["id","title","detail","status","priority","dueDate","assignedToPersonId","assignedToName","createdByPersonId","source","reportType","submissionId","completedAt","createdAt","overdue"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a compliance task (emits ComplianceTaskCreated)","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"detail":{"type":"string","maxLength":10000},"priority":{"type":"string","enum":["low","normal","high","urgent"],"default":"normal"},"dueDate":{"type":"string","format":"date"},"assignedToPersonId":{"type":"string","format":"uuid"},"reportType":{"type":"string","maxLength":64}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"detail":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueDate":{"type":"string","format":"date","nullable":true},"assignedToPersonId":{"type":"string","nullable":true},"assignedToName":{"type":"string","nullable":true},"createdByPersonId":{"type":"string","nullable":true},"source":{"type":"string"},"reportType":{"type":"string","nullable":true},"submissionId":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"overdue":{"type":"boolean"}},"required":["id","title","detail","status","priority","dueDate","assignedToPersonId","assignedToName","createdByPersonId","source","reportType","submissionId","completedAt","createdAt","overdue"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/tasks/{id}":{"patch":{"summary":"Update a compliance task: assign, reprioritize, set due date, complete or reopen","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"detail":{"type":"string","maxLength":10000,"nullable":true},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","in_progress","completed","cancelled"]},"dueDate":{"type":"string","format":"date","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"detail":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueDate":{"type":"string","format":"date","nullable":true},"assignedToPersonId":{"type":"string","nullable":true},"assignedToName":{"type":"string","nullable":true},"createdByPersonId":{"type":"string","nullable":true},"source":{"type":"string"},"reportType":{"type":"string","nullable":true},"submissionId":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"overdue":{"type":"boolean"}},"required":["id","title","detail","status","priority","dueDate","assignedToPersonId","assignedToName","createdByPersonId","source","reportType","submissionId","completedAt","createdAt","overdue"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/schedules":{"get":{"summary":"State submission calendar","tags":["Compliance"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"schoolYear","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"collection":{"type":"string"},"schoolYear":{"type":"string"},"window":{"type":"string","nullable":true},"opensOn":{"type":"string","format":"date","nullable":true},"dueOn":{"type":"string","format":"date"},"source":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"daysUntilDue":{"type":"integer"},"status":{"type":"string","enum":["upcoming","open","due_soon","overdue","filed"]},"submissionId":{"type":"string","format":"uuid","nullable":true}},"required":["id","stateCode","reportType","collection","schoolYear","window","opensOn","dueOn","source","sourceUrl","isActive","notes","daysUntilDue","status","submissionId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a submission deadline","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportType":{"type":"string","minLength":1,"maxLength":64},"collection":{"type":"string","minLength":1,"maxLength":120},"schoolYear":{"type":"string","pattern":"^\\d{4}-\\d{4}$"},"window":{"type":"string","maxLength":64},"opensOn":{"type":"string","format":"date"},"dueOn":{"type":"string","format":"date"},"sourceUrl":{"type":"string","format":"uri","maxLength":500},"notes":{"type":"string","maxLength":5000},"isActive":{"type":"boolean"}},"required":["reportType","collection","schoolYear","dueOn"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"collection":{"type":"string"},"schoolYear":{"type":"string"},"window":{"type":"string","nullable":true},"opensOn":{"type":"string","format":"date","nullable":true},"dueOn":{"type":"string","format":"date"},"source":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"daysUntilDue":{"type":"integer"},"status":{"type":"string","enum":["upcoming","open","due_soon","overdue","filed"]},"submissionId":{"type":"string","format":"uuid","nullable":true}},"required":["id","stateCode","reportType","collection","schoolYear","window","opensOn","dueOn","source","sourceUrl","isActive","notes","daysUntilDue","status","submissionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/schedules/{id}":{"patch":{"summary":"Correct a deadline (the state moved it) or deactivate it","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportType":{"type":"string","minLength":1,"maxLength":64},"collection":{"type":"string","minLength":1,"maxLength":120},"schoolYear":{"type":"string","pattern":"^\\d{4}-\\d{4}$"},"window":{"type":"string","maxLength":64},"opensOn":{"type":"string","format":"date"},"dueOn":{"type":"string","format":"date"},"sourceUrl":{"type":"string","format":"uri","maxLength":500},"notes":{"type":"string","maxLength":5000},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"collection":{"type":"string"},"schoolYear":{"type":"string"},"window":{"type":"string","nullable":true},"opensOn":{"type":"string","format":"date","nullable":true},"dueOn":{"type":"string","format":"date"},"source":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"daysUntilDue":{"type":"integer"},"status":{"type":"string","enum":["upcoming","open","due_soon","overdue","filed"]},"submissionId":{"type":"string","format":"uuid","nullable":true}},"required":["id","stateCode","reportType","collection","schoolYear","window","opensOn","dueOn","source","sourceUrl","isActive","notes","daysUntilDue","status","submissionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a deadline","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/schedules/seed-njdoe":{"post":{"summary":"Load the NJDOE submission cadence for a school year","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYear":{"type":"string","pattern":"^\\d{4}-\\d{4}$"}},"required":["schoolYear"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"}},"required":["created"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/smids/missing":{"get":{"summary":"List active students without a SMID","tags":["Compliance"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"localId":{"type":"string"},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","localId","smid"],"additionalProperties":false}},"total":{"type":"integer","minimum":0},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","total","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/smids/{id}":{"post":{"summary":"Assign a SMID to a student","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"smid":{"type":"string","pattern":"^(?:\\d{10}|NJ\\d{8})$"}},"required":["smid"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"localId":{"type":"string"},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","localId","smid"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/smids/generate-missing":{"post":{"summary":"Generate placeholder SMIDs for every active student without one","tags":["Compliance"],"description":"Uses a deterministic `NJ########` prefix. These are PLACEHOLDERS, not state-issued IDs: official SMIDs must be imported from NJSMART before state submission, and report generation with `?strict=true` blocks while any placeholder remains. Safe to re-run — only assigns where smid is currently null. The response carries `placeholdersGenerated: true` and a warning message.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"generated":{"type":"integer","minimum":0},"assignments":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"smid":{"type":"string"}},"required":["studentId","smid"],"additionalProperties":false}},"placeholdersGenerated":{"type":"boolean"},"warning":{"type":"string"}},"required":["generated","assignments","placeholdersGenerated","warning"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/compliance/reports":{"get":{"summary":"List generated state reports","tags":["Compliance"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"reportType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reportType":{"type":"string"},"period":{"type":"string"},"status":{"type":"string"},"generatedAt":{"type":"string","format":"date-time","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"summary":{"type":"object","additionalProperties":{}}},"required":["id","reportType","period","status","generatedAt","submittedAt","dueDate","summary"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/reports/available":{"get":{"summary":"List state-report adapters available for the calling district","tags":["Compliance"],"description":"Reads the district's state code and returns the registered adapters for that state. Used by the admin UI to render generation buttons dynamically.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stateCode":{"type":"string","nullable":true},"adapters":{"type":"array","items":{"type":"object","properties":{"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"fileDescription":{"type":"string"},"imports":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"href":{"type":"string"},"provides":{"type":"string"}},"required":["key","label","href","provides"],"additionalProperties":false},"default":[]}},"required":["stateCode","reportType","label"],"additionalProperties":false}}},"required":["stateCode","adapters"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/smids/audit":{"get":{"summary":"Audit SMID coverage for the calling district","tags":["Compliance"],"description":"Returns counts of students on placeholder (NJ########) IDs and students with no SMID. Used by the UI to show a \"ready to submit\" badge and by the strict-generation flow to block submission.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalActive":{"type":"integer"},"placeholderCount":{"type":"integer"},"missingCount":{"type":"integer"},"placeholderSampleIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["totalActive","placeholderCount","missingCount","placeholderSampleIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/reports/{id}":{"get":{"summary":"Get a state-report record","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reportType":{"type":"string"},"period":{"type":"string"},"status":{"type":"string"},"generatedAt":{"type":"string","format":"date-time","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"summary":{"type":"object","additionalProperties":{}}},"required":["id","reportType","period","status","generatedAt","submittedAt","dueDate","summary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/reports/state/{stateCode}/{reportType}/preview":{"get":{"summary":"Preview a state report on screen without generating a submission","tags":["Compliance"],"description":"Runs the registered adapter and returns header + first N rows as JSON, plus the adapter summary (row counts, data gaps). Nothing is persisted — use the generate route to produce the actual submission file.","parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"window","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"stateCode","required":true},{"schema":{"type":"string","minLength":1,"maxLength":60},"in":"path","name":"reportType","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"label":{"type":"string"},"filename":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"totalRows":{"type":"integer"},"truncated":{"type":"boolean"},"previewSupported":{"type":"boolean"},"summary":{"type":"object","additionalProperties":{},"nullable":true}},"required":["label","filename","columns","rows","totalRows","truncated","previewSupported","summary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/state-data/{dataset}/import-template":{"get":{"summary":"Download a blank NJ SLEDS import template (CSV, state layout)","tags":["Compliance"],"description":"Header row matches the NJDOE template exactly, plus one example row — delete it before uploading real data.","parameters":[{"schema":{"type":"string","enum":["staff-management","cte","sped-details","vacancies"]},"in":"path","name":"dataset","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/state-data/{dataset}/import":{"post":{"summary":"Import NJ SLEDS state data — preview or apply","tags":["Compliance"],"description":"Upload CSV in the state template layout. `mode=preview` (default) validates without writing; `mode=apply` upserts valid rows and reports per-row errors for the rest. The staff-management SocialSecurityNumber column is accepted but never stored.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":10000000},"mode":{"type":"string","enum":["preview","apply"],"default":"preview"}},"required":["csv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","enum":["staff-management","cte","sped-details","vacancies"]},"in":"path","name":"dataset","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"valid":{"type":"integer"},"invalid":{"type":"integer"},"created":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"field":{"type":"string"},"message":{"type":"string"}},"required":["row","field","message"],"additionalProperties":false}}},"required":["total","valid","invalid","created","updated","skipped","errors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/state-data/vacancies":{"get":{"summary":"List staff vacancy episodes (NJ SLEDS Staff Vacancy rows)","tags":["Compliance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"schoolOrganizationId":{"type":"string","format":"uuid"},"positionTypeCode":{"type":"string"},"jobCode":{"type":"string"},"jobCodeSubcategory":{"type":"string","nullable":true},"openDate":{"type":"string"},"closedDate":{"type":"string","nullable":true},"applicantCount":{"type":"integer","nullable":true}},"required":["id","hrPositionId","schoolOrganizationId","positionTypeCode","jobCode","jobCodeSubcategory","openDate","closedDate","applicantCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a staff vacancy episode","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hrPositionId":{"type":"string","format":"uuid"},"schoolOrganizationId":{"type":"string","format":"uuid"},"positionTypeCode":{"type":"string","minLength":1,"maxLength":10},"jobCode":{"type":"string","minLength":1,"maxLength":10},"jobCodeSubcategory":{"type":"string","maxLength":10},"openDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"closedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicantCount":{"type":"integer","minimum":0}},"required":["schoolOrganizationId","positionTypeCode","jobCode","openDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"schoolOrganizationId":{"type":"string","format":"uuid"},"positionTypeCode":{"type":"string"},"jobCode":{"type":"string"},"jobCodeSubcategory":{"type":"string","nullable":true},"openDate":{"type":"string"},"closedDate":{"type":"string","nullable":true},"applicantCount":{"type":"integer","nullable":true}},"required":["id","hrPositionId","schoolOrganizationId","positionTypeCode","jobCode","jobCodeSubcategory","openDate","closedDate","applicantCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/state-data/vacancies/{id}":{"patch":{"summary":"Update a staff vacancy episode","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hrPositionId":{"type":"string","format":"uuid"},"schoolOrganizationId":{"type":"string","format":"uuid"},"positionTypeCode":{"type":"string","minLength":1,"maxLength":10},"jobCode":{"type":"string","minLength":1,"maxLength":10},"jobCodeSubcategory":{"type":"string","maxLength":10},"openDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"closedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicantCount":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"schoolOrganizationId":{"type":"string","format":"uuid"},"positionTypeCode":{"type":"string"},"jobCode":{"type":"string"},"jobCodeSubcategory":{"type":"string","nullable":true},"openDate":{"type":"string"},"closedDate":{"type":"string","nullable":true},"applicantCount":{"type":"integer","nullable":true}},"required":["id","hrPositionId","schoolOrganizationId","positionTypeCode","jobCode","jobCodeSubcategory","openDate","closedDate","applicantCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a staff vacancy episode (soft delete)","tags":["Compliance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions":{"get":{"summary":"List state submissions (filing history)","tags":["Compliance"],"description":"Every filing attempt for this district, newest first. `activeOnly` hides attempts a later correction already superseded.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"query","name":"stateCode","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"reportType","required":false},{"schema":{"type":"string","enum":["draft","ready","submitted","accepted","rejected","superseded","void"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open a state submission draft","tags":["Compliance"],"description":"Creates a draft for a registered adapter report. Pass `supersedesId` to open a correction: the earlier attempt moves to `superseded` and this one starts at its attempt number + 1.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stateCode":{"type":"string","minLength":2,"maxLength":2},"reportType":{"type":"string","minLength":1,"maxLength":64},"periodFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"window":{"type":"string","maxLength":64},"collection":{"type":"string","maxLength":120},"scheduleId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":4000},"supersedesId":{"type":"string","format":"uuid"}},"required":["stateCode","reportType","periodFrom","periodTo"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}":{"get":{"summary":"Get a submission with its rejection worklist","tags":["Compliance"],"description":"Errors come back in the state’s documented resolution order (record-level first). `errorSummary.fieldCountsUnreliable` is true while record-level errors are open — the state has not evaluated field rules for those records yet.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"type":"string"},"errorType":{"type":"string"},"rawErrorType":{"type":"string","nullable":true},"dataElement":{"type":"string","nullable":true},"message":{"type":"string"},"priority":{"type":"integer"},"rowNumber":{"type":"integer","nullable":true},"recordType":{"type":"string","nullable":true},"recordLocalId":{"type":"string","nullable":true},"recordStateId":{"type":"string","nullable":true},"personId":{"type":"string","nullable":true},"personName":{"type":"string","nullable":true},"status":{"type":"string"},"resolutionNote":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"label":{"type":"string"},"meaning":{"type":"string"},"remedy":{"type":"string"},"fixLocation":{"type":"string","nullable":true}},"required":["id","level","errorType","rawErrorType","dataElement","message","priority","rowNumber","recordType","recordLocalId","recordStateId","personId","personName","status","resolutionNote","resolvedAt","label","meaning","remedy","fixLocation"],"additionalProperties":false}},"errorSummary":{"type":"object","properties":{"total":{"type":"integer"},"open":{"type":"integer"},"recordLevel":{"type":"integer"},"fieldLevel":{"type":"integer"},"fieldCountsUnreliable":{"type":"boolean"},"byType":{"type":"array","items":{"type":"object","properties":{"errorType":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer"},"open":{"type":"integer"},"priority":{"type":"integer"}},"required":["errorType","label","count","open","priority"],"additionalProperties":false}}},"required":["total","open","recordLevel","fieldLevel","fieldCountsUnreliable","byType"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"checksum":{"type":"string"},"byteSize":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","kind","fileName","contentType","checksum","byteSize","createdAt"],"additionalProperties":false}}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt","errors","errorSummary","files"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Void an unfiled submission draft","tags":["Compliance"],"description":"Only a draft that was never filed can be voided. A filed submission is corrected by opening a new attempt with `supersedesId`, which keeps the filing history intact.","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"type":"object","properties":{"reason":{"type":"string","maxLength":1000}},"additionalProperties":false}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}/file":{"post":{"summary":"File a submission — generate the bytes and record the filing","tags":["Compliance"],"description":"Runs the adapter, retains the exact bytes with a SHA-256 checksum, and marks the submission submitted. The upload to the state is out of band for portal states such as NJ: download the retained file, upload it in the state portal, and record the confirmation number here.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"submissionMethod":{"type":"string","enum":["portal","sftp","https","manual"],"default":"portal"},"confirmationNumber":{"type":"string","maxLength":100},"submittedAt":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":4000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"},"unitCount":{"type":"integer"},"checksum":{"type":"string"},"filename":{"type":"string"}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt","unitCount","checksum","filename"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}/response":{"post":{"summary":"Record the state’s verdict on a filed submission","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted","rejected"]},"respondedAt":{"type":"string","format":"date-time"},"stateResponseNote":{"type":"string","maxLength":8000},"acceptedRecords":{"type":"integer","minimum":0},"rejectedRecords":{"type":"integer","minimum":0}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stateCode":{"type":"string"},"reportType":{"type":"string"},"label":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"window":{"type":"string","nullable":true},"collection":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"status":{"type":"string"},"attempt":{"type":"integer"},"stateReportId":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"submissionMethod":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"respondedAt":{"type":"string","nullable":true},"stateResponseNote":{"type":"string","nullable":true},"acceptedRecords":{"type":"integer","nullable":true},"rejectedRecords":{"type":"integer","nullable":true},"supersedesId":{"type":"string","format":"uuid","nullable":true},"supersededById":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"openErrors":{"type":"integer"},"totalErrors":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","stateCode","reportType","label","periodFrom","periodTo","window","collection","dueDate","status","attempt","stateReportId","submittedAt","submissionMethod","confirmationNumber","respondedAt","stateResponseNote","acceptedRecords","rejectedRecords","supersedesId","supersededById","notes","openErrors","totalErrors","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}/errors/import":{"post":{"summary":"Import the state error report for a filed submission","tags":["Compliance"],"description":"Upload the state’s rejection export as CSV. `mode=preview` (default) shows what would land, including which rows matched a local person and which columns were not recognised; `mode=apply` writes the worklist. Rows already marked fixed or waived are preserved, so a re-reported error is visible as a failed fix rather than silently overwritten.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":10000000},"mode":{"type":"string","enum":["preview","apply"],"default":"preview"},"fileName":{"type":"string","maxLength":255},"replace":{"type":"boolean","default":true}},"required":["csv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string","enum":["preview","apply"]},"recognised":{"type":"boolean"},"total":{"type":"integer"},"imported":{"type":"integer"},"matchedPersons":{"type":"integer"},"unmatchedRows":{"type":"integer"},"preservedResolved":{"type":"integer"},"mappedColumns":{"type":"object","additionalProperties":{"type":"string"}},"unmappedColumns":{"type":"array","items":{"type":"string"}},"rowErrors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"message":{"type":"string"}},"required":["row","message"],"additionalProperties":false}},"summary":{"type":"object","properties":{"total":{"type":"integer"},"open":{"type":"integer"},"recordLevel":{"type":"integer"},"fieldLevel":{"type":"integer"},"fieldCountsUnreliable":{"type":"boolean"},"byType":{"type":"array","items":{"type":"object","properties":{"errorType":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer"},"open":{"type":"integer"},"priority":{"type":"integer"}},"required":["errorType","label","count","open","priority"],"additionalProperties":false}}},"required":["total","open","recordLevel","fieldLevel","fieldCountsUnreliable","byType"],"additionalProperties":false},"sample":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"type":"string"},"errorType":{"type":"string"},"rawErrorType":{"type":"string","nullable":true},"dataElement":{"type":"string","nullable":true},"message":{"type":"string"},"priority":{"type":"integer"},"rowNumber":{"type":"integer","nullable":true},"recordType":{"type":"string","nullable":true},"recordLocalId":{"type":"string","nullable":true},"recordStateId":{"type":"string","nullable":true},"personId":{"type":"string","nullable":true},"personName":{"type":"string","nullable":true},"status":{"type":"string"},"resolutionNote":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"label":{"type":"string"},"meaning":{"type":"string"},"remedy":{"type":"string"},"fixLocation":{"type":"string","nullable":true}},"required":["id","level","errorType","rawErrorType","dataElement","message","priority","rowNumber","recordType","recordLocalId","recordStateId","personId","personName","status","resolutionNote","resolvedAt","label","meaning","remedy","fixLocation"],"additionalProperties":false}}},"required":["mode","recognised","total","imported","matchedPersons","unmatchedRows","preservedResolved","mappedColumns","unmappedColumns","rowErrors","summary","sample"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}/errors":{"get":{"summary":"List a submission’s rejection rows in resolution order","tags":["Compliance"],"parameters":[{"schema":{"type":"string","enum":["open","fixed","waived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["transfer","unresolved","sync","duplicate","out_of_sync","missing_required","format","validation","other"]},"in":"query","name":"errorType","required":false},{"schema":{"type":"string","enum":["record","field"]},"in":"query","name":"level","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"type":"string"},"errorType":{"type":"string"},"rawErrorType":{"type":"string","nullable":true},"dataElement":{"type":"string","nullable":true},"message":{"type":"string"},"priority":{"type":"integer"},"rowNumber":{"type":"integer","nullable":true},"recordType":{"type":"string","nullable":true},"recordLocalId":{"type":"string","nullable":true},"recordStateId":{"type":"string","nullable":true},"personId":{"type":"string","nullable":true},"personName":{"type":"string","nullable":true},"status":{"type":"string"},"resolutionNote":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"label":{"type":"string"},"meaning":{"type":"string"},"remedy":{"type":"string"},"fixLocation":{"type":"string","nullable":true}},"required":["id","level","errorType","rawErrorType","dataElement","message","priority","rowNumber","recordType","recordLocalId","recordStateId","personId","personName","status","resolutionNote","resolvedAt","label","meaning","remedy","fixLocation"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/errors/{errorId}":{"patch":{"summary":"Mark a rejection row fixed, waived, or reopen it","tags":["Compliance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","fixed","waived"]},"resolutionNote":{"type":"string","maxLength":4000}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"errorId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"type":"string"},"errorType":{"type":"string"},"rawErrorType":{"type":"string","nullable":true},"dataElement":{"type":"string","nullable":true},"message":{"type":"string"},"priority":{"type":"integer"},"rowNumber":{"type":"integer","nullable":true},"recordType":{"type":"string","nullable":true},"recordLocalId":{"type":"string","nullable":true},"recordStateId":{"type":"string","nullable":true},"personId":{"type":"string","nullable":true},"personName":{"type":"string","nullable":true},"status":{"type":"string"},"resolutionNote":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"label":{"type":"string"},"meaning":{"type":"string"},"remedy":{"type":"string"},"fixLocation":{"type":"string","nullable":true}},"required":["id","level","errorType","rawErrorType","dataElement","message","priority","rowNumber","recordType","recordLocalId","recordStateId","personId","personName","status","resolutionNote","resolvedAt","label","meaning","remedy","fixLocation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/submissions/{id}/files/{fileId}":{"get":{"summary":"Download a retained submission or error-report file","tags":["Compliance"],"description":"Returns the exact bytes retained at filing time, so what was sent to the state stays recoverable and checksum-verifiable.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/compliance/instructional-time":{"get":{"summary":"Per-school instructional-time breakdown","tags":["Compliance"],"description":"Evaluates the INSTRUCTIONAL_TIME_RULE and returns the per-school breakdown the rule computed: days counted, days projected, minutes counted, minutes projected, short-day list, findings. Designed for the drill-down dashboard.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"asOf":{"type":"string","format":"date-time"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"schoolYearName":{"type":"string","nullable":true},"stateCode":{"type":"string","nullable":true},"stateMinDays":{"type":"integer","nullable":true},"stateMinMinutes":{"type":"integer","nullable":true},"policy":{"type":"object","properties":{"defaultDailyMinutes":{"type":"integer","nullable":true},"minDailyMinutesForCount":{"type":"integer","nullable":true},"warnBufferDays":{"type":"integer","nullable":true},"maxDaysCeiling":{"type":"integer","nullable":true},"minDaysOverride":{"type":"integer","nullable":true}},"required":["defaultDailyMinutes","minDailyMinutesForCount","warnBufferDays","maxDaysCeiling","minDaysOverride"],"additionalProperties":false},"schools":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolName":{"type":"string"},"daysCountedSoFar":{"type":"integer"},"daysProjectedFullYear":{"type":"integer"},"minutesCountedSoFar":{"type":"integer"},"minutesProjectedFullYear":{"type":"integer"},"remainingScheduledDays":{"type":"integer"},"shortDays":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"scheduledMinutes":{"type":"integer"},"reason":{"type":"string","nullable":true}},"required":["date","scheduledMinutes","reason"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"ruleVersion":{"type":"integer"},"severity":{"type":"string","enum":["info","warn","blocker"]},"subjectType":{"type":"string"},"subjectId":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ruleId","ruleVersion","severity","subjectType","subjectId","message"],"additionalProperties":false}}},"required":["schoolId","schoolName","daysCountedSoFar","daysProjectedFullYear","minutesCountedSoFar","minutesProjectedFullYear","remainingScheduledDays","shortDays","findings"],"additionalProperties":false}}},"required":["asOf","schoolYearId","schoolYearName","stateCode","stateMinDays","stateMinMinutes","policy","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/districts/instructional-time-policy":{"get":{"summary":"Read the district instructional-time policy","tags":["District"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"defaultDailyMinutes":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"minDailyMinutesForCount":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"warnBufferDays":{"type":"integer","minimum":0,"maximum":60,"nullable":true},"maxDaysCeiling":{"type":"integer","minimum":0,"maximum":366,"nullable":true},"minDaysOverride":{"type":"integer","minimum":0,"maximum":366,"nullable":true}},"required":["defaultDailyMinutes","minDailyMinutesForCount","warnBufferDays","maxDaysCeiling","minDaysOverride"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update the district instructional-time policy","tags":["District"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"defaultDailyMinutes":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"minDailyMinutesForCount":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"warnBufferDays":{"type":"integer","minimum":0,"maximum":60,"nullable":true},"maxDaysCeiling":{"type":"integer","minimum":0,"maximum":366,"nullable":true},"minDaysOverride":{"type":"integer","minimum":0,"maximum":366,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"defaultDailyMinutes":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"minDailyMinutesForCount":{"type":"integer","minimum":0,"maximum":720,"nullable":true},"warnBufferDays":{"type":"integer","minimum":0,"maximum":60,"nullable":true},"maxDaysCeiling":{"type":"integer","minimum":0,"maximum":366,"nullable":true},"minDaysOverride":{"type":"integer","minimum":0,"maximum":366,"nullable":true}},"required":["defaultDailyMinutes","minDailyMinutesForCount","warnBufferDays","maxDaysCeiling","minDaysOverride"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/preview/genesis":{"post":{"summary":"Preview a Genesis CSV migration (read-only — no writes)","tags":["Migration"],"description":"Paste students.csv, guardians.csv (optional), and enrollments.csv from a Genesis 5 export. Returns row counts, warnings, and the first 10 students so the district can validate the mapping. Does NOT commit. To actually apply the migration, contact your Forge SIS account manager.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"guardiansCsv":{"type":"string","maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"vendor":{"type":"string","enum":["genesis","powerschool","oneroster"]},"stats":{"type":"object","properties":{"personsCount":{"type":"integer"},"studentsCount":{"type":"integer"},"guardiansCount":{"type":"integer"},"staffCount":{"type":"integer"},"enrollmentsCount":{"type":"integer"},"guardianshipsCount":{"type":"integer"},"coursesCount":{"type":"integer"},"sectionsCount":{"type":"integer"},"schedulesCount":{"type":"integer"},"attendanceCount":{"type":"integer"},"gradesCount":{"type":"integer"},"immunizationsCount":{"type":"integer"},"incidentsCount":{"type":"integer"},"warningsCount":{"type":"integer"}},"required":["personsCount","studentsCount","guardiansCount","staffCount","enrollmentsCount","guardianshipsCount","coursesCount","sectionsCount","schedulesCount","attendanceCount","gradesCount","immunizationsCount","incidentsCount","warningsCount"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"sample":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["localId","smid","firstName","lastName","dateOfBirth","gradeLevel"],"additionalProperties":false}}},"required":["students"],"additionalProperties":false}},"required":["vendor","stats","warnings","sample"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/preview/powerschool":{"post":{"summary":"Preview a PowerSchool CSV migration (read-only — no writes)","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"guardiansCsv":{"type":"string","maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"vendor":{"type":"string","enum":["genesis","powerschool","oneroster"]},"stats":{"type":"object","properties":{"personsCount":{"type":"integer"},"studentsCount":{"type":"integer"},"guardiansCount":{"type":"integer"},"staffCount":{"type":"integer"},"enrollmentsCount":{"type":"integer"},"guardianshipsCount":{"type":"integer"},"coursesCount":{"type":"integer"},"sectionsCount":{"type":"integer"},"schedulesCount":{"type":"integer"},"attendanceCount":{"type":"integer"},"gradesCount":{"type":"integer"},"immunizationsCount":{"type":"integer"},"incidentsCount":{"type":"integer"},"warningsCount":{"type":"integer"}},"required":["personsCount","studentsCount","guardiansCount","staffCount","enrollmentsCount","guardianshipsCount","coursesCount","sectionsCount","schedulesCount","attendanceCount","gradesCount","immunizationsCount","incidentsCount","warningsCount"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"sample":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["localId","smid","firstName","lastName","dateOfBirth","gradeLevel"],"additionalProperties":false}}},"required":["students"],"additionalProperties":false}},"required":["vendor","stats","warnings","sample"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/preview/oneroster":{"post":{"summary":"Preview a OneRoster CSV migration (read-only — no writes)","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"usersCsv":{"type":"string","minLength":1,"maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["usersCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"vendor":{"type":"string","enum":["genesis","powerschool","oneroster"]},"stats":{"type":"object","properties":{"personsCount":{"type":"integer"},"studentsCount":{"type":"integer"},"guardiansCount":{"type":"integer"},"staffCount":{"type":"integer"},"enrollmentsCount":{"type":"integer"},"guardianshipsCount":{"type":"integer"},"coursesCount":{"type":"integer"},"sectionsCount":{"type":"integer"},"schedulesCount":{"type":"integer"},"attendanceCount":{"type":"integer"},"gradesCount":{"type":"integer"},"immunizationsCount":{"type":"integer"},"incidentsCount":{"type":"integer"},"warningsCount":{"type":"integer"}},"required":["personsCount","studentsCount","guardiansCount","staffCount","enrollmentsCount","guardianshipsCount","coursesCount","sectionsCount","schedulesCount","attendanceCount","gradesCount","immunizationsCount","incidentsCount","warningsCount"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"sample":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"localId":{"type":"string"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["localId","smid","firstName","lastName","dateOfBirth","gradeLevel"],"additionalProperties":false}}},"required":["students"],"additionalProperties":false}},"required":["vendor","stats","warnings","sample"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/apply/{vendor}":{"post":{"summary":"Apply a CSV migration — writes students, guardians, enrollments and history into this district","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"genesis":{"type":"object","properties":{"studentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"guardiansCsv":{"type":"string","maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false},"powerschool":{"type":"object","properties":{"studentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"guardiansCsv":{"type":"string","maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false},"oneroster":{"type":"object","properties":{"usersCsv":{"type":"string","minLength":1,"maxLength":50000000},"enrollmentsCsv":{"type":"string","minLength":1,"maxLength":50000000},"coursesCsv":{"type":"string","maxLength":50000000},"sectionsCsv":{"type":"string","maxLength":50000000},"schedulesCsv":{"type":"string","maxLength":50000000},"attendanceCsv":{"type":"string","maxLength":50000000},"gradesCsv":{"type":"string","maxLength":50000000},"immunizationsCsv":{"type":"string","maxLength":50000000},"incidentsCsv":{"type":"string","maxLength":50000000}},"required":["usersCsv","enrollmentsCsv"],"additionalProperties":false},"maxNewPersons":{"type":"integer","minimum":1,"maximum":50000,"default":2000},"confirm":{"type":"boolean","enum":[true]}},"required":["confirm"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","enum":["genesis","powerschool","oneroster"]},"in":"path","name":"vendor","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"vendor":{"type":"string"},"projected":{"type":"object","additionalProperties":{}},"applied":{"type":"object","additionalProperties":{}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["vendor","projected","applied","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/reconcile":{"post":{"summary":"Count the same rows three ways and show where any go missing","tags":["Migration"],"description":"Parses the upload, dry-runs the write, and reports rows-in-file against rows-parsed against rows-the-writer-would-accept, with a reason for every record that would be refused. Writes nothing.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendor":{"type":"string","enum":["genesis","powerschool","oneroster"]},"files":{"type":"object","properties":{"students":{"type":"string","maxLength":50000000},"users":{"type":"string","maxLength":50000000},"guardians":{"type":"string","maxLength":50000000},"enrollments":{"type":"string","maxLength":50000000},"courses":{"type":"string","maxLength":50000000},"sections":{"type":"string","maxLength":50000000},"schedules":{"type":"string","maxLength":50000000},"attendance":{"type":"string","maxLength":50000000},"grades":{"type":"string","maxLength":50000000},"immunizations":{"type":"string","maxLength":50000000},"incidents":{"type":"string","maxLength":50000000}},"additionalProperties":false}},"required":["vendor","files"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"vendor":{"type":"string"},"filesSeen":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"rows":{"type":"integer"},"bytes":{"type":"integer"}},"required":["name","rows","bytes"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"entity":{"type":"string"},"inFile":{"type":"integer","nullable":true},"parsed":{"type":"integer"},"wouldWrite":{"type":"integer"},"rejected":{"type":"integer"},"rejectReasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"integer"},"examples":{"type":"array","items":{"type":"string"}}},"required":["reason","count","examples"],"additionalProperties":false}},"unexplained":{"type":"integer"},"balances":{"type":"boolean"}},"required":["entity","inFile","parsed","wouldWrite","rejected","rejectReasons","unexplained","balances"],"additionalProperties":false}},"totals":{"type":"object","properties":{"parsed":{"type":"integer"},"wouldWrite":{"type":"integer"},"rejected":{"type":"integer"},"unexplained":{"type":"integer"},"balances":{"type":"boolean"}},"required":["parsed","wouldWrite","rejected","unexplained","balances"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"count":{"type":"integer"}},"required":["message","count"],"additionalProperties":false}},"sideBySide":{"type":"array","items":{"type":"object","properties":{"source":{"type":"object","additionalProperties":{"type":"string","nullable":true}},"forge":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"required":["source","forge"],"additionalProperties":false}},"generatedAt":{"type":"string"}},"required":["vendor","filesSeen","lines","totals","warnings","sideBySide","generatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/runs":{"get":{"summary":"History of SIS import previews and commits","tags":["Migration"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["preview","commit"]},"in":"query","name":"mode","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"vendor":{"type":"string"},"mode":{"type":"string"},"status":{"type":"string"},"personsCount":{"type":"integer"},"studentsCount":{"type":"integer"},"guardiansCount":{"type":"integer"},"staffCount":{"type":"integer"},"enrollmentsCount":{"type":"integer"},"guardianshipsCount":{"type":"integer"},"createdCount":{"type":"integer"},"updatedCount":{"type":"integer"},"skippedCount":{"type":"integer"},"warnings":{"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string","nullable":true},"fileNames":{"type":"array","items":{"type":"string"}},"runByUserId":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","vendor","mode","status","personsCount","studentsCount","guardiansCount","staffCount","enrollmentsCount","guardianshipsCount","createdCount","updatedCount","skippedCount","warnings","errorMessage","fileNames","runByUserId","startedAt","completedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/sync-connections":{"get":{"summary":"List automated SIS sync connections","tags":["Migration"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"vendor":{"type":"string"},"sourceType":{"type":"string"},"sourcePaths":{"type":"object","properties":{"students":{"type":"string"},"guardians":{"type":"string"},"enrollments":{"type":"string"}},"additionalProperties":false},"sftpHost":{"type":"string","nullable":true},"sftpPort":{"type":"integer","nullable":true},"sftpUser":{"type":"string","nullable":true},"authHeaderName":{"type":"string","nullable":true},"hasSecret":{"type":"boolean"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"applyMode":{"type":"string"},"maxNewPersons":{"type":"integer"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRunId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","vendor","sourceType","sourcePaths","sftpHost","sftpPort","sftpUser","authHeaderName","hasSecret","cadence","dayOfWeek","runAtLocal","timezone","applyMode","maxNewPersons","isActive","lastRunAt","lastStatus","lastError","lastRunId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an automated SIS sync connection","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"vendor":{"type":"string","enum":["genesis","powerschool","oneroster"]},"sourceType":{"type":"string","enum":["url","sftp"],"default":"url"},"sourcePaths":{"type":"object","properties":{"students":{"type":"string","minLength":1,"maxLength":500},"guardians":{"type":"string","minLength":1,"maxLength":500},"enrollments":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false},"sftpHost":{"type":"string","maxLength":255},"sftpPort":{"type":"integer","minimum":1,"maximum":65535},"sftpUser":{"type":"string","maxLength":190},"secret":{"type":"string","maxLength":20000},"authHeaderName":{"type":"string","maxLength":120},"cadence":{"type":"string","enum":["daily","weekly"],"default":"daily"},"dayOfWeek":{"type":"integer","minimum":1,"maximum":7},"runAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$","default":"02:00"},"timezone":{"type":"string","minLength":1,"maxLength":64,"default":"America/New_York"},"applyMode":{"type":"string","enum":["dry_run","apply"],"default":"dry_run"},"maxNewPersons":{"type":"integer","minimum":1,"maximum":100000,"default":500}},"required":["name","vendor","sourcePaths"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"vendor":{"type":"string"},"sourceType":{"type":"string"},"sourcePaths":{"type":"object","properties":{"students":{"type":"string"},"guardians":{"type":"string"},"enrollments":{"type":"string"}},"additionalProperties":false},"sftpHost":{"type":"string","nullable":true},"sftpPort":{"type":"integer","nullable":true},"sftpUser":{"type":"string","nullable":true},"authHeaderName":{"type":"string","nullable":true},"hasSecret":{"type":"boolean"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"applyMode":{"type":"string"},"maxNewPersons":{"type":"integer"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRunId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","vendor","sourceType","sourcePaths","sftpHost","sftpPort","sftpUser","authHeaderName","hasSecret","cadence","dayOfWeek","runAtLocal","timezone","applyMode","maxNewPersons","isActive","lastRunAt","lastStatus","lastError","lastRunId","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/sync-connections/{id}":{"patch":{"summary":"Edit, arm, or pause a sync connection","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sourcePaths":{"type":"object","properties":{"students":{"type":"string","minLength":1,"maxLength":500},"guardians":{"type":"string","minLength":1,"maxLength":500},"enrollments":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false},"sftpHost":{"type":"string","maxLength":255,"nullable":true},"sftpPort":{"type":"integer","minimum":1,"maximum":65535,"nullable":true},"sftpUser":{"type":"string","maxLength":190,"nullable":true},"secret":{"type":"string","maxLength":20000},"authHeaderName":{"type":"string","maxLength":120,"nullable":true},"cadence":{"type":"string","enum":["daily","weekly"]},"dayOfWeek":{"type":"integer","minimum":1,"maximum":7,"nullable":true},"runAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"timezone":{"type":"string","minLength":1,"maxLength":64},"applyMode":{"type":"string","enum":["dry_run","apply"]},"maxNewPersons":{"type":"integer","minimum":1,"maximum":100000},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"vendor":{"type":"string"},"sourceType":{"type":"string"},"sourcePaths":{"type":"object","properties":{"students":{"type":"string"},"guardians":{"type":"string"},"enrollments":{"type":"string"}},"additionalProperties":false},"sftpHost":{"type":"string","nullable":true},"sftpPort":{"type":"integer","nullable":true},"sftpUser":{"type":"string","nullable":true},"authHeaderName":{"type":"string","nullable":true},"hasSecret":{"type":"boolean"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"applyMode":{"type":"string"},"maxNewPersons":{"type":"integer"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRunId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","vendor","sourceType","sourcePaths","sftpHost","sftpPort","sftpUser","authHeaderName","hasSecret","cadence","dayOfWeek","runAtLocal","timezone","applyMode","maxNewPersons","isActive","lastRunAt","lastStatus","lastError","lastRunId","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a sync connection","tags":["Migration"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/sync-connections/{id}/test":{"post":{"summary":"Fetch the source files without parsing or writing","tags":["Migration"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bytes":{"type":"integer"},"firstLine":{"type":"string"}},"required":["name","bytes","firstLine"],"additionalProperties":false}}},"required":["ok","files"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/sync-connections/{id}/run-now":{"post":{"summary":"Run a sync immediately (preview unless the body says otherwise)","tags":["Migration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/file-specs":{"get":{"summary":"Accepted import file formats and column names, per vendor","tags":["Migration"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","required":["genesis","powerschool","oneroster"],"properties":{"genesis":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"bodyKey":{"type":"string"},"required":{"type":"boolean"},"group":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"columns":{"type":"array","items":{"type":"string"}},"example":{"type":"string"},"notes":{"type":"string"}},"required":["id","label","required","columns","example"],"additionalProperties":false}}},"required":["id","label","bodyKey","required","group","description","fields"],"additionalProperties":false}},"powerschool":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"bodyKey":{"type":"string"},"required":{"type":"boolean"},"group":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"columns":{"type":"array","items":{"type":"string"}},"example":{"type":"string"},"notes":{"type":"string"}},"required":["id","label","required","columns","example"],"additionalProperties":false}}},"required":["id","label","bodyKey","required","group","description","fields"],"additionalProperties":false}},"oneroster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"bodyKey":{"type":"string"},"required":{"type":"boolean"},"group":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"columns":{"type":"array","items":{"type":"string"}},"example":{"type":"string"},"notes":{"type":"string"}},"required":["id","label","required","columns","example"],"additionalProperties":false}}},"required":["id","label","bodyKey","required","group","description","fields"],"additionalProperties":false}}},"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/migration/file-specs/{vendor}/{file}.csv":{"get":{"summary":"Download a blank CSV template for one import file","tags":["Migration"],"parameters":[{"schema":{"type":"string","enum":["genesis","powerschool","oneroster"]},"in":"path","name":"vendor","required":true},{"schema":{"type":"string","minLength":1,"maxLength":40},"in":"path","name":"file","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/positions":{"get":{"summary":"List HR positions","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"positionCode":{"type":"string"},"title":{"type":"string"},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"fteEquivalent":{"type":"number"},"certRequired":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"employmentType":{"type":"string"},"bargainingUnit":{"type":"string","nullable":true},"reportingToTitle":{"type":"string","nullable":true},"workDays":{"type":"integer","nullable":true},"dailyHours":{"type":"number","nullable":true},"salaryRange":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"step":{"type":"string","nullable":true}},"required":["min","max","step"],"additionalProperties":false,"nullable":true},"isSupervisory":{"type":"boolean"},"isConfidential":{"type":"boolean"},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedPersonName":{"type":"string","nullable":true}},"required":["id","positionCode","title","budgetAccountId","fteEquivalent","certRequired","description","employmentType","bargainingUnit","reportingToTitle","workDays","dailyHours","salaryRange","isSupervisory","isConfidential","assignedPersonId","assignedPersonName"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create HR position","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"positionCode":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":200},"budgetAccountId":{"type":"string","format":"uuid"},"fteEquivalent":{"type":"number","minimum":0,"maximum":2,"default":1},"certRequired":{"type":"array","items":{"type":"string","maxLength":50},"default":[]},"description":{"type":"string","maxLength":4000},"employmentType":{"type":"string","enum":["certificated","classified","substitute","contract"],"default":"certificated"},"bargainingUnit":{"type":"string","maxLength":30},"reportingToTitle":{"type":"string","maxLength":200},"workDays":{"type":"integer","minimum":0,"maximum":260},"dailyHours":{"type":"number","minimum":0,"maximum":24},"salaryRange":{"type":"object","properties":{"min":{"type":"number","minimum":0},"max":{"type":"number","minimum":0},"step":{"type":"string","maxLength":60}},"additionalProperties":false},"isSupervisory":{"type":"boolean","default":false},"isConfidential":{"type":"boolean","default":false},"assignedPersonId":{"type":"string","format":"uuid"}},"required":["positionCode","title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"positionCode":{"type":"string"},"title":{"type":"string"},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"fteEquivalent":{"type":"number"},"certRequired":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"employmentType":{"type":"string"},"bargainingUnit":{"type":"string","nullable":true},"reportingToTitle":{"type":"string","nullable":true},"workDays":{"type":"integer","nullable":true},"dailyHours":{"type":"number","nullable":true},"salaryRange":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"step":{"type":"string","nullable":true}},"required":["min","max","step"],"additionalProperties":false,"nullable":true},"isSupervisory":{"type":"boolean"},"isConfidential":{"type":"boolean"},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedPersonName":{"type":"string","nullable":true}},"required":["id","positionCode","title","budgetAccountId","fteEquivalent","certRequired","description","employmentType","bargainingUnit","reportingToTitle","workDays","dailyHours","salaryRange","isSupervisory","isConfidential","assignedPersonId","assignedPersonName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/positions/{id}":{"get":{"summary":"Get HR position","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"positionCode":{"type":"string"},"title":{"type":"string"},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"fteEquivalent":{"type":"number"},"certRequired":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"employmentType":{"type":"string"},"bargainingUnit":{"type":"string","nullable":true},"reportingToTitle":{"type":"string","nullable":true},"workDays":{"type":"integer","nullable":true},"dailyHours":{"type":"number","nullable":true},"salaryRange":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"step":{"type":"string","nullable":true}},"required":["min","max","step"],"additionalProperties":false,"nullable":true},"isSupervisory":{"type":"boolean"},"isConfidential":{"type":"boolean"},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedPersonName":{"type":"string","nullable":true}},"required":["id","positionCode","title","budgetAccountId","fteEquivalent","certRequired","description","employmentType","bargainingUnit","reportingToTitle","workDays","dailyHours","salaryRange","isSupervisory","isConfidential","assignedPersonId","assignedPersonName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update HR position","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"budgetAccountId":{"type":"string","format":"uuid"},"fteEquivalent":{"type":"number","minimum":0,"maximum":2,"default":1},"certRequired":{"type":"array","items":{"type":"string","maxLength":50},"default":[]},"description":{"type":"string","maxLength":4000},"employmentType":{"type":"string","enum":["certificated","classified","substitute","contract"],"default":"certificated"},"bargainingUnit":{"type":"string","maxLength":30},"reportingToTitle":{"type":"string","maxLength":200},"workDays":{"type":"integer","minimum":0,"maximum":260},"dailyHours":{"type":"number","minimum":0,"maximum":24},"salaryRange":{"type":"object","properties":{"min":{"type":"number","minimum":0},"max":{"type":"number","minimum":0},"step":{"type":"string","maxLength":60}},"additionalProperties":false},"isSupervisory":{"type":"boolean","default":false},"isConfidential":{"type":"boolean","default":false},"assignedPersonId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"positionCode":{"type":"string"},"title":{"type":"string"},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"fteEquivalent":{"type":"number"},"certRequired":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"employmentType":{"type":"string"},"bargainingUnit":{"type":"string","nullable":true},"reportingToTitle":{"type":"string","nullable":true},"workDays":{"type":"integer","nullable":true},"dailyHours":{"type":"number","nullable":true},"salaryRange":{"type":"object","properties":{"min":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"step":{"type":"string","nullable":true}},"required":["min","max","step"],"additionalProperties":false,"nullable":true},"isSupervisory":{"type":"boolean"},"isConfidential":{"type":"boolean"},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedPersonName":{"type":"string","nullable":true}},"required":["id","positionCode","title","budgetAccountId","fteEquivalent","certRequired","description","employmentType","bargainingUnit","reportingToTitle","workDays","dailyHours","salaryRange","isSupervisory","isConfidential","assignedPersonId","assignedPersonName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/positions/build-from-staff":{"post":{"summary":"Build the position roster from the staff list","tags":["Business Office"],"description":"Creates or refreshes one position per member of staff. Anyone rostered to teach a section is given a teaching position; everyone else is placed against the staffing pattern a district of this size runs. Each position carries its salary range and the budget line the salary is charged to. Idempotent.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/retirement-plans":{"get":{"summary":"List retirement plans available in this district's state","tags":["Business Office"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stateCode":{"type":"string","nullable":true},"isLegacy":{"type":"boolean"},"assignment":{"type":"object","properties":{"certificated":{"type":"string","nullable":true},"classified":{"type":"string","nullable":true}},"required":["certificated","classified"],"additionalProperties":false},"plans":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"fullName":{"type":"string"},"coverage":{"type":"string","enum":["certificated","classified","any"]},"employeeContribution":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["flat"]},"rates":{"type":"array","items":{"type":"object","properties":{"effectiveYear":{"type":"integer"},"rate":{"type":"number"},"note":{"type":"string"}},"required":["effectiveYear","rate"],"additionalProperties":false}}},"required":["type","rates"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tiered"]},"tiers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"hiredBefore":{"type":"string"},"hiredOnOrAfter":{"type":"string"},"rates":{"type":"array","items":{"type":"object","properties":{"effectiveYear":{"type":"integer"},"rate":{"type":"number"},"note":{"type":"string"}},"required":["effectiveYear","rate"],"additionalProperties":false}},"note":{"type":"string"}},"required":["code","name","rates"],"additionalProperties":false}},"defaultTier":{"type":"string"}},"required":["type","tiers"],"additionalProperties":false}]},"employerContribution":{"type":"object","properties":{"rates":{"type":"array","items":{"type":"object","properties":{"effectiveYear":{"type":"integer"},"rate":{"type":"number"},"note":{"type":"string"}},"required":["effectiveYear","rate"],"additionalProperties":false}},"note":{"type":"string"}},"required":["rates"],"additionalProperties":false},"wageBaseCap":{"type":"object","properties":{"annualCap":{"type":"number"},"note":{"type":"string"}},"required":["annualCap"],"additionalProperties":false},"specRef":{"type":"string"},"description":{"type":"string"},"href":{"type":"string"}},"required":["code","fullName","coverage","employeeContribution"],"additionalProperties":false}}},"required":["stateCode","isLegacy","assignment","plans"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/retirement-plans/resolve":{"post":{"summary":"Dry-run a retirement-contribution calculation","tags":["Business Office"],"description":"Without writing a payroll entry, compute what the employee/employer contribution would be for a given gross, plan/category, and hire date. Used by the admin contribution tester and by bulk-import validators.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"grossPay":{"type":"number","minimum":0,"maximum":1000000},"year":{"type":"integer","minimum":1990,"maximum":2200},"planCode":{"type":"string","minLength":1,"maxLength":40},"employmentCategory":{"type":"string","enum":["certificated","classified","none"]},"hireDate":{"type":"string","format":"date"},"tierCode":{"type":"string","minLength":1,"maxLength":40},"ytdPayPrior":{"type":"number","minimum":0,"maximum":10000000},"deductions":{"type":"object","additionalProperties":{"type":"number","minimum":0},"default":{}}},"required":["grossPay"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resolvedPlanCode":{"type":"string","nullable":true},"tierCode":{"type":"string","nullable":true},"gross":{"type":"number"},"net":{"type":"number"},"employeeContribution":{"type":"number"},"employeeRate":{"type":"number"},"employerContribution":{"type":"number","nullable":true},"employerRate":{"type":"number","nullable":true},"contributionBasis":{"type":"number"},"otherDeductions":{"type":"number"},"usedFallback":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["no-plan-resolved","state-config-legacy","plan-missing-rates"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["resolvedPlanCode","tierCode","gross","net","employeeContribution","employeeRate","employerContribution","employerRate","contributionBasis","otherDeductions","usedFallback","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations":{"get":{"summary":"List staff evaluations","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"staffId","required":false},{"schema":{"type":"string"},"in":"query","name":"cycleName","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open an evaluation cycle for a staff member","tags":["Business Office"],"description":"Framework defaults to the district's resolved evaluation framework (state default or district override). Pass `frameworkCode` explicitly to pin a cycle to a specific rubric.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string","minLength":1,"maxLength":100},"frameworkCode":{"type":"string","minLength":1,"maxLength":60}},"required":["staffPersonId","cycleName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}":{"get":{"summary":"Get an evaluation","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/observations":{"post":{"summary":"Append an observation to an evaluation","tags":["Business Office"],"description":"Validates the observation against the cycle's framework. Unknown domains, out-of-range scores, and off-step scores return 422 with structured issues rather than silently storing garbage.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"observedAt":{"type":"string","format":"date-time"},"observerPersonId":{"type":"string","format":"uuid"},"domain":{"type":"string","minLength":1,"maxLength":60},"score":{"type":"number"},"notes":{"type":"string","maxLength":5000},"durationMinutes":{"type":"integer","minimum":0,"maximum":600},"announced":{"type":"boolean"}},"required":["observedAt","observerPersonId","domain","score"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["unknown-domain","score-out-of-range","score-not-on-step","score-not-in-categorical-values","duration-out-of-range"]},"message":{"type":"string"},"path":{"type":"string"}},"required":["code","message","path"],"additionalProperties":false}}},"required":["issues"],"additionalProperties":false},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/sgo":{"post":{"summary":"Set the SGO plan on an evaluation","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sgoPlan":{"type":"object","additionalProperties":{}}},"required":["sgoPlan"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/complete":{"post":{"summary":"Close an evaluation with a final score (emits EvaluationCompleted)","tags":["Business Office"],"description":"Auto-computes the summative score from observations + SGO using the cycle's framework. If the caller supplies `finalScore`, that value is persisted; otherwise the computed score is used. The scoring breakdown (per-domain averages, warnings, summative rating band) is always returned alongside.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"finalScore":{"type":"number","minimum":0,"maximum":5},"studentGrowthScore":{"type":"number","minimum":0,"maximum":5}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"evaluation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"},"scoring":{"type":"object","properties":{"practiceScore":{"type":"number","nullable":true},"studentGrowthScore":{"type":"number","nullable":true},"finalScore":{"type":"number","nullable":true},"summativeRating":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"minScore":{"type":"number"},"maxScore":{"type":"number"}},"required":["code","label","minScore","maxScore"],"additionalProperties":false,"nullable":true},"domainBreakdown":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"averageScore":{"type":"number"},"weight":{"type":"number"},"observationCount":{"type":"number"}},"required":["code","averageScore","weight","observationCount"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["below-required-observations","below-required-announced","below-required-unannounced","below-required-total-minutes","missing-student-growth","no-observations"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["practiceScore","studentGrowthScore","finalScore","summativeRating","domainBreakdown","warnings"],"additionalProperties":false}},"required":["evaluation","eventId","scoring"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluation-framework":{"get":{"summary":"Resolve the teacher evaluation framework for this district","tags":["Business Office"],"description":"Returns the framework currently applied to this district: district override if set, otherwise the state default, otherwise the generic fallback. Observation scores for all open cycles should match this framework.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"framework":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string","enum":["NJ","CA","TX","NY","FL","IL","PA","multi-state","generic"]},"audience":{"type":"string","enum":["teacher","leader","any"]},"specRef":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"domains":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"weight":{"type":"number"},"components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["code","name"],"additionalProperties":false}},"ratingScale":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["numeric"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"labels":{"type":"array","items":{"type":"string"}}},"required":["type","min","max","step"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["categorical"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}]},"observation":{"type":"object","properties":{"required":{"type":"number"},"minAnnounced":{"type":"number"},"minUnannounced":{"type":"number"},"minTotalMinutes":{"type":"number"}},"additionalProperties":false},"studentGrowth":{"type":"object","properties":{"required":{"type":"boolean"},"weightInFinalScore":{"type":"number"},"label":{"type":"string"},"description":{"type":"string"}},"required":["required","weightInFinalScore","label"],"additionalProperties":false},"scoring":{"type":"object","properties":{"practiceAggregation":{"type":"string","enum":["weighted-average","simple-average","highest"]},"practiceWeight":{"type":"number"},"summativeRatingBands":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"minScore":{"type":"number"},"maxScore":{"type":"number"}},"required":["code","label","minScore","maxScore"],"additionalProperties":false}},"description":{"type":"string"}},"required":["practiceAggregation","practiceWeight","summativeRatingBands"],"additionalProperties":false},"reviewedYear":{"type":"number"}},"required":["code","name","jurisdiction","audience","specRef","href","description","domains","ratingScale","observation","scoring","reviewedYear"],"additionalProperties":false},"source":{"type":"string","enum":["district-override","state-default","fallback-generic"]},"usedFallback":{"type":"boolean"},"requestedCode":{"type":"string","nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["framework-unknown-code","framework-not-configured","framework-district-override"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["framework","source","usedFallback","requestedCode","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluation-framework/catalog":{"get":{"summary":"List all built-in evaluation frameworks","tags":["Business Office"],"description":"Returns the full catalog of frameworks Forge ships with. Used by the admin UI to let districts pick an override framework.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"frameworks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string","enum":["NJ","CA","TX","NY","FL","IL","PA","multi-state","generic"]},"audience":{"type":"string","enum":["teacher","leader","any"]},"specRef":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"domains":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"weight":{"type":"number"},"components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["code","name"],"additionalProperties":false}},"ratingScale":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["numeric"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"labels":{"type":"array","items":{"type":"string"}}},"required":["type","min","max","step"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["categorical"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}]},"observation":{"type":"object","properties":{"required":{"type":"number"},"minAnnounced":{"type":"number"},"minUnannounced":{"type":"number"},"minTotalMinutes":{"type":"number"}},"additionalProperties":false},"studentGrowth":{"type":"object","properties":{"required":{"type":"boolean"},"weightInFinalScore":{"type":"number"},"label":{"type":"string"},"description":{"type":"string"}},"required":["required","weightInFinalScore","label"],"additionalProperties":false},"scoring":{"type":"object","properties":{"practiceAggregation":{"type":"string","enum":["weighted-average","simple-average","highest"]},"practiceWeight":{"type":"number"},"summativeRatingBands":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"minScore":{"type":"number"},"maxScore":{"type":"number"}},"required":["code","label","minScore","maxScore"],"additionalProperties":false}},"description":{"type":"string"}},"required":["practiceAggregation","practiceWeight","summativeRatingBands"],"additionalProperties":false},"reviewedYear":{"type":"number"}},"required":["code","name","jurisdiction","audience","specRef","href","description","domains","ratingScale","observation","scoring","reviewedYear"],"additionalProperties":false}}},"required":["frameworks"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/detail":{"get":{"summary":"Get full evaluation detail including conferences, artifacts, and observations","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true},"sgoApprovedAt":{"type":"string","format":"date-time","nullable":true},"sgoApprovedByPersonId":{"type":"string","format":"uuid","nullable":true},"conferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]},"addedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","title","description","evidenceUrl","category","addedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore","sgoApprovedAt","sgoApprovedByPersonId","conferences","artifacts","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/mine":{"get":{"summary":"List the signed-in teacher's own evaluation cycles (read-only)","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true},"sgoApprovedAt":{"type":"string","format":"date-time","nullable":true},"sgoApprovedByPersonId":{"type":"string","format":"uuid","nullable":true},"conferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]},"addedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","title","description","evidenceUrl","category","addedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore","sgoApprovedAt","sgoApprovedByPersonId","conferences","artifacts","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/conferences":{"get":{"summary":"List conferences for an evaluation cycle","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a conference for an evaluation cycle (emits EvalConferenceScheduled)","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":5000}},"required":["conferenceType","scheduledAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/conferences/{subId}":{"patch":{"summary":"Update a conference (mark as held, add notes)","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":5000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"subId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/artifacts":{"get":{"summary":"List evidence artifacts for an evaluation cycle","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]},"addedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","title","description","evidenceUrl","category","addedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an evidence artifact (emits EvalArtifactUploaded)","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"evidenceUrl":{"type":"string","format":"uri","maxLength":2000},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]}},"required":["title","evidenceUrl","category"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]},"addedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","title","description","evidenceUrl","category","addedByPersonId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/artifacts/{subId}":{"delete":{"summary":"Soft-delete an evidence artifact","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"subId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/sgo/approve":{"post":{"summary":"Supervisor approves the teacher's SGO plan (emits SgoApproved)","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"cycleName":{"type":"string"},"frameworkCode":{"type":"string"},"status":{"type":"string"},"observations":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sgoPlan":{"type":"object","additionalProperties":{},"nullable":true},"finalScore":{"type":"number","nullable":true},"sgoApprovedAt":{"type":"string","format":"date-time","nullable":true},"sgoApprovedByPersonId":{"type":"string","format":"uuid","nullable":true},"conferences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"conferenceType":{"type":"string","enum":["pre_observation","post_observation","end_of_year"]},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"initiatedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","conferenceType","scheduledAt","heldAt","notes","initiatedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["lesson_plan","assessment","student_work","professional_goal","other"]},"addedByPersonId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","evaluationId","title","description","evidenceUrl","category","addedByPersonId","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","cycleName","frameworkCode","status","observations","sgoPlan","finalScore","sgoApprovedAt","sgoApprovedByPersonId","conferences","artifacts","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/evaluations/{id}/status":{"patch":{"summary":"Transition an evaluation cycle through the lifecycle","tags":["Business Office"],"description":"Valid transitions: draft → in_progress, in_progress → pending_review, pending_review → complete. The complete route (POST /complete) closes the cycle with a computed score — use this route only to transition back to pending_review if a score needs revision, or draft → in_progress.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","in_progress","pending_review","complete"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["draft","in_progress","pending_review","complete"]},"previousStatus":{"type":"string"}},"required":["id","status","previousStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/report-card-comment":{"post":{"summary":"Draft a grounded report-card comment for one (student, section, term)","tags":["AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"sectionId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"}},"required":["studentId","sectionId","termId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/student-summary":{"post":{"summary":"Generate a grounded summary for one student","tags":["AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"}},"required":["studentId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/ask":{"post":{"summary":"Parent portal Q&A — grounded in the asking guardian’s visible data","tags":["AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"question":{"type":"string","minLength":5,"maxLength":1000}},"required":["studentId","question"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/early-warning":{"post":{"summary":"Grounded early-warning narrative for one student","tags":["AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"}},"required":["studentId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/teacher-copilot":{"post":{"summary":"Weekly digest for one section (trends + check-ins + overdue)","tags":["AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"}},"required":["sectionId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/nlq":{"post":{"summary":"Turn a natural-language question into a read-only query plan","tags":["AI"],"description":"Returns a JSON plan (no execution). The admin console previews the plan before running it; SQL injection is impossible because the API validates the plan against an allowlist of tables + filter keys.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":5,"maxLength":1000}},"required":["question"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/ai/usage":{"get":{"summary":"AI usage and cost for this district (last 1000 calls)","tags":["AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalCalls":{"type":"integer"},"totalCostUsd":{"type":"number"},"byPromptId":{"type":"array","items":{"type":"object","properties":{"promptId":{"type":"string"},"calls":{"type":"integer"},"costUsd":{"type":"number"}},"required":["promptId","calls","costUsd"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"promptId":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"costUsd":{"type":"number"},"latencyMs":{"type":"integer"},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","promptId","provider","model","costUsd","latencyMs","occurredAt"],"additionalProperties":false}}},"required":["totalCalls","totalCostUsd","byPromptId","recent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/registration/documents/extract":{"post":{"summary":"Extract structured fields from a scanned registration document","tags":["AI"],"description":"Vision endpoint — takes a base64 image or PDF and returns a typed field bag plus region citations. Registrars click \"Extract\" to pre-fill the application from uploaded documents; the human always reviews before saving.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["birth-certificate","residency-proof","immunization","transcript","iep","other"]},"mediaType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","application/pdf"]},"base64":{"type":"string","minLength":100,"maxLength":25000000},"schema":{"type":"object","additionalProperties":{}}},"required":["kind","mediaType","base64"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":{}},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["fields","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/translate":{"post":{"summary":"Translate a short school message into a target language","tags":["AI"],"description":"Used by the messaging composer to reach families in their home language. Preserves proper nouns, dates, and times. Non-grounded prompt — the source text is the only authoritative input.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000},"targetLanguage":{"type":"string","minLength":2,"maxLength":40},"sourceLanguage":{"type":"string","minLength":2,"maxLength":40},"audience":{"type":"string","enum":["parent","student","staff"],"default":"parent"}},"required":["text","targetLanguage"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"translatedText":{"type":"string"},"targetLanguage":{"type":"string"},"promptId":{"type":"string"}},"required":["translatedText","targetLanguage","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/nurse/visit-note/expand":{"post":{"summary":"Expand a nurse’s shorthand into a SOAP-structured visit note","tags":["AI"],"description":"Optional `studentId` pulls the student’s last 3 visits as grounding so the narrative is consistent with prior care.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"shorthand":{"type":"string","minLength":1,"maxLength":2000},"studentId":{"type":"string","format":"uuid"}},"required":["shorthand"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/iep/progress-narrative":{"post":{"summary":"Draft a quarterly IEP-goal progress narrative for one student","tags":["AI"],"description":"Pulls recent assignment scores + attendance + any assertions on the student record and drafts a parent-facing narrative. Teacher of record reviews before saving into the IEP.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"goalText":{"type":"string","minLength":1,"maxLength":1000},"quarter":{"type":"string","minLength":1,"maxLength":20}},"required":["studentId","goalText","quarter"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"promptId":{"type":"string"}},"required":["content","citations","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/scheduling/propose-change":{"post":{"summary":"Parse a free-text schedule-change request into structured operations","tags":["AI"],"description":"Preview-only — returns the operations the scheduler would need to execute. No changes are applied until the admin confirms via the existing scheduling endpoints.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"string","minLength":3,"maxLength":2000}},"required":["request"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["type","args"],"additionalProperties":false}},"summary":{"type":"string"},"promptId":{"type":"string"}},"required":["operations","summary","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ai/grading/rubric-score":{"post":{"summary":"Draft rubric-aligned scores and a teacher comment for a student essay","tags":["AI"],"description":"The teacher retains final authority — this endpoint produces a draft score with evidence quoted verbatim from the essay and a suggested comment. Every `evidence` value must be a substring of the essay.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"essay":{"type":"string","minLength":20,"maxLength":40000},"rubric":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"criteria":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000},"maxScore":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":100},"levels":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string"},"description":{"type":"string"},"points":{"type":"number"}},"required":["level","description","points"],"additionalProperties":false}}},"required":["name","maxScore"],"additionalProperties":false},"minItems":1,"maxItems":12}},"required":["criteria"],"additionalProperties":false},"studentLabel":{"type":"string","maxLength":100}},"required":["essay","rubric"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"overallScore":{"type":"number"},"maxScore":{"type":"number"},"criteria":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"},"maxScore":{"type":"number"},"rationale":{"type":"string"},"evidence":{"type":"string"}},"required":["name","score","maxScore","rationale","evidence"],"additionalProperties":false}},"suggestedComment":{"type":"string"},"promptId":{"type":"string"}},"required":["overallScore","maxScore","criteria","suggestedComment","promptId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/dashboard/teacher/me":{"get":{"summary":"Summary for the signed-in teacher’s dashboard","tags":["Dashboard"],"description":"Resolves the teacher’s Person row from the session, lists their current sections, and computes per-section attendance + grade averages plus a 10-day attendance/grade sparkline from real rows.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"teacher":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sectionCode":{"type":"string"},"rosterSize":{"type":"integer"},"attendanceRatePct":{"type":"number","nullable":true},"averageGradePct":{"type":"number","nullable":true}},"required":["id","name","sectionCode","rosterSize","attendanceRatePct","averageGradePct"],"additionalProperties":false}},"stats":{"type":"object","properties":{"sectionCount":{"type":"integer"},"rosterTotal":{"type":"integer"},"attendanceTodayPct":{"type":"number","nullable":true},"attendanceTrendPct":{"type":"array","items":{"type":"number"}},"classAveragePct":{"type":"number","nullable":true},"classAverageTrendPct":{"type":"array","items":{"type":"number"}},"assignmentsToGrade":{"type":"integer"}},"required":["sectionCount","rosterTotal","attendanceTodayPct","attendanceTrendPct","classAveragePct","classAverageTrendPct","assignmentsToGrade"],"additionalProperties":false}},"required":["teacher","sections","stats"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/dashboard/admin/summary":{"get":{"summary":"District-wide rollups for the admin overview","tags":["Dashboard"],"description":"Enrollment count + trend, attendance rate + trend, open compliance findings, open incidents, pending registration applications, health visits in the past 7 days, and — only for districts billed on their own AI key, or for platform operators — AI cost for the last 30 days.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"enrollment":{"type":"integer"},"enrollmentTrend":{"type":"array","items":{"type":"integer"},"nullable":true},"attendanceRatePct":{"type":"number","nullable":true},"attendanceTrendPct":{"type":"array","items":{"type":"number"}},"openComplianceFindings":{"type":"integer"},"complianceScorePct":{"type":"number","nullable":true},"complianceTrendPct":{"type":"array","items":{"type":"number"},"nullable":true},"openIncidents":{"type":"integer"},"pendingRegistrations":{"type":"integer"},"healthVisitsPast7Days":{"type":"integer"}},"required":["enrollment","enrollmentTrend","attendanceRatePct","attendanceTrendPct","openComplianceFindings","complianceScorePct","complianceTrendPct","openIncidents","pendingRegistrations","healthVisitsPast7Days"],"additionalProperties":false},"staff":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"],"additionalProperties":false},"ai":{"type":"object","properties":{"callsPast30Days":{"type":"integer"},"costUsdPast30Days":{"type":"number"}},"required":["callsPast30Days","costUsdPast30Days"],"additionalProperties":false}},"required":["stats","staff"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/dashboard/superintendent":{"get":{"summary":"Executive overview for the district superintendent","tags":["Dashboard"],"description":"Aggregates student metrics, compliance alerts, staff KPIs, financial snapshot, recent event activity, and state reporting deadlines into a single payload for the superintendent dashboard.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"object","properties":{"totalEnrolled":{"type":"integer"},"attendanceRateToday":{"type":"number","nullable":true},"adaForTerm":{"type":"number","nullable":true},"activeIepCount":{"type":"integer"}},"required":["totalEnrolled","attendanceRateToday","adaForTerm","activeIepCount"],"additionalProperties":false},"compliance":{"type":"object","properties":{"topFindings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"severity":{"type":"string","enum":["blocker","warn","info"]},"message":{"type":"string"},"subjectType":{"type":"string"},"count":{"type":"integer"}},"required":["ruleId","severity","message","subjectType","count"],"additionalProperties":false}}},"required":["topFindings"],"additionalProperties":false},"staff":{"type":"object","properties":{"totalActive":{"type":"integer"},"openSubJobsToday":{"type":"integer"},"evaluationsPendingThisMonth":{"type":"integer"}},"required":["totalActive","openSubJobsToday","evaluationsPendingThisMonth"],"additionalProperties":false},"financial":{"type":"object","properties":{"feesOutstandingCents":{"type":"integer"},"poCommittedCents":{"type":"integer"},"poBudgetCents":{"type":"integer"}},"required":["feesOutstandingCents","poCommittedCents","poBudgetCents"],"additionalProperties":false},"recentActivity":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string"},"actorId":{"type":"string","format":"uuid","nullable":true},"subjectType":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["eventType","actorId","subjectType","occurredAt"],"additionalProperties":false}},"stateReportDeadlines":{"type":"array","items":{"type":"object","properties":{"reportType":{"type":"string"},"dueDate":{"type":"string","format":"date"},"daysRemaining":{"type":"integer"}},"required":["reportType","dueDate","daysRemaining"],"additionalProperties":false}}},"required":["students","compliance","staff","financial","recentActivity","stateReportDeadlines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/registration/districts/{districtId}/applications":{"post":{"summary":"Submit a new family / re-registration application","tags":["Registration"],"description":"Public endpoint used by the registration wizard. Returns an access token families use to resume the draft and upload documents.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["new-family","re-registration","transfer"]},"targetSchoolYearId":{"type":"string","format":"uuid"},"targetOrganizationId":{"type":"string","format":"uuid"},"targetGrade":{"type":"string","maxLength":10},"studentFirstName":{"type":"string","minLength":1,"maxLength":100},"studentLastName":{"type":"string","minLength":1,"maxLength":100},"studentMiddleName":{"type":"string","maxLength":100},"studentDob":{"type":"string","format":"date"},"studentGender":{"type":"string","maxLength":20},"studentEmail":{"type":"string","format":"email"},"studentPhone":{"type":"string","maxLength":30},"guardians":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"relationshipType":{"type":"string","minLength":1,"maxLength":30},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":30},"emergencyPriority":{"type":"integer","minimum":1,"maximum":99},"hasCustody":{"type":"boolean"}},"required":["firstName","lastName","relationshipType"],"additionalProperties":false},"minItems":1},"residency":{"type":"object","properties":{"addressLine1":{"type":"string","minLength":1,"maxLength":200},"addressLine2":{"type":"string","maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","minLength":5,"maxLength":10},"proofType":{"type":"string","maxLength":50}},"required":["addressLine1","city","state","zipCode"],"additionalProperties":false},"health":{"type":"object","additionalProperties":{}},"prevSchool":{"type":"object","additionalProperties":{}}},"required":["type","studentFirstName","studentLastName","guardians","residency"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accessToken":{"type":"string"},"status":{"type":"string"}},"required":["id","accessToken","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/registration/districts/{districtId}/applications/by-token/{token}":{"get":{"summary":"Resume a registration draft by access token","tags":["Registration"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true},{"schema":{"type":"string","minLength":8,"maxLength":128},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"type":{"type":"string"},"studentFirstName":{"type":"string"},"studentLastName":{"type":"string"},"targetGrade":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"createdPersonId":{"type":"string","format":"uuid","nullable":true},"studentMiddleName":{"type":"string","nullable":true},"studentDob":{"type":"string","format":"date","nullable":true},"studentGender":{"type":"string","nullable":true},"studentEmail":{"type":"string","format":"email","nullable":true},"studentPhone":{"type":"string","nullable":true},"guardians":{"type":"array","items":{"type":"object","additionalProperties":{}}},"residency":{"type":"object","additionalProperties":{}},"health":{"type":"object","additionalProperties":{},"nullable":true},"prevSchool":{"type":"object","additionalProperties":{},"nullable":true},"rejectionReason":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer"},"verifiedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","filename","contentType","sizeBytes","verifiedAt","createdAt"],"additionalProperties":false}}},"required":["id","status","type","studentFirstName","studentLastName","targetGrade","submittedAt","reviewedAt","createdPersonId","studentMiddleName","studentDob","studentGender","studentEmail","studentPhone","guardians","residency","health","prevSchool","rejectionReason","reviewNotes","documents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/registration/districts/{districtId}/applications/by-token/{token}/documents":{"post":{"summary":"Attach an uploaded document to an application","tags":["Registration"],"description":"The actual bytes are uploaded to object storage out-of-band; this records the metadata + storage key.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["birth-certificate","residency-proof","immunization","transcript","iep","other"]},"filename":{"type":"string","minLength":1,"maxLength":300},"contentType":{"type":"string","minLength":1,"maxLength":100},"sizeBytes":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":52428800},"storageKey":{"type":"string","minLength":1,"maxLength":500},"checksumSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["kind","filename","contentType","sizeBytes","storageKey","checksumSha256"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true},{"schema":{"type":"string","minLength":8,"maxLength":128},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"}},"required":["id","applicationId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/registration/applications":{"get":{"summary":"List registration applications (registrar view)","tags":["Registration"],"parameters":[{"schema":{"type":"string","enum":["draft","submitted","under-review","approved","rejected","withdrawn"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"type":{"type":"string"},"studentFirstName":{"type":"string"},"studentLastName":{"type":"string"},"targetGrade":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"createdPersonId":{"type":"string","format":"uuid","nullable":true}},"required":["id","status","type","studentFirstName","studentLastName","targetGrade","submittedAt","reviewedAt","createdPersonId"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}}}}},"/registration/applications/{id}":{"get":{"summary":"Get a full application (registrar view)","tags":["Registration"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"type":{"type":"string"},"studentFirstName":{"type":"string"},"studentLastName":{"type":"string"},"targetGrade":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"createdPersonId":{"type":"string","format":"uuid","nullable":true},"studentMiddleName":{"type":"string","nullable":true},"studentDob":{"type":"string","format":"date","nullable":true},"studentGender":{"type":"string","nullable":true},"studentEmail":{"type":"string","format":"email","nullable":true},"studentPhone":{"type":"string","nullable":true},"guardians":{"type":"array","items":{"type":"object","additionalProperties":{}}},"residency":{"type":"object","additionalProperties":{}},"health":{"type":"object","additionalProperties":{},"nullable":true},"prevSchool":{"type":"object","additionalProperties":{},"nullable":true},"rejectionReason":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer"},"verifiedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","filename","contentType","sizeBytes","verifiedAt","createdAt"],"additionalProperties":false}}},"required":["id","status","type","studentFirstName","studentLastName","targetGrade","submittedAt","reviewedAt","createdPersonId","studentMiddleName","studentDob","studentGender","studentEmail","studentPhone","guardians","residency","health","prevSchool","rejectionReason","reviewNotes","documents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/registration/applications/{id}/approve":{"post":{"summary":"Approve an application and create the student + enrollment","tags":["Registration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"enrollmentId":{"type":"string","format":"uuid","nullable":true}},"required":["personId","enrollmentId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/registration/applications/{id}/reject":{"post":{"summary":"Reject an application","tags":["Registration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/reports/catalog":{"get":{"summary":"List the field catalog for every report scope","tags":["Reports"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"pii":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false}}},"required":["scope","fields"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/reports/custom":{"get":{"summary":"List saved custom reports","tags":["Reports"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"scope","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string"},"isShared":{"type":"boolean"},"allowedRoles":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","format":"uuid","nullable":true},"schedule":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","scope","isShared","allowedRoles","createdBy","schedule","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a saved custom report","tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"definition":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","in","notIn","gt","gte","lt","lte","contains","startsWith","isNull","notNull"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["field","op"],"additionalProperties":false},"default":[]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"asc"}},"required":["field"],"additionalProperties":false},"default":[]},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000,"default":1000}},"required":["scope","fields"],"additionalProperties":false},"allowedRoles":{"type":"array","items":{"type":"string"},"default":["district_admin"]},"isShared":{"type":"boolean","default":false},"schedule":{"type":"string","maxLength":100}},"required":["name","definition"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string"},"isShared":{"type":"boolean"},"allowedRoles":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","format":"uuid","nullable":true},"schedule":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"definition":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","in","notIn","gt","gte","lt","lte","contains","startsWith","isNull","notNull"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["field","op"],"additionalProperties":false},"default":[]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"asc"}},"required":["field"],"additionalProperties":false},"default":[]},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000,"default":1000}},"required":["scope","fields"],"additionalProperties":false}},"required":["id","name","description","scope","isShared","allowedRoles","createdBy","schedule","createdAt","updatedAt","definition"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/custom/{id}":{"get":{"summary":"Get a saved custom report","tags":["Reports"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string"},"isShared":{"type":"boolean"},"allowedRoles":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","format":"uuid","nullable":true},"schedule":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"definition":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","in","notIn","gt","gte","lt","lte","contains","startsWith","isNull","notNull"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["field","op"],"additionalProperties":false},"default":[]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"asc"}},"required":["field"],"additionalProperties":false},"default":[]},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000,"default":1000}},"required":["scope","fields"],"additionalProperties":false}},"required":["id","name","description","scope","isShared","allowedRoles","createdBy","schedule","createdAt","updatedAt","definition"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Update a saved custom report","tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"definition":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","in","notIn","gt","gte","lt","lte","contains","startsWith","isNull","notNull"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["field","op"],"additionalProperties":false},"default":[]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"asc"}},"required":["field"],"additionalProperties":false},"default":[]},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000,"default":1000}},"required":["scope","fields"],"additionalProperties":false},"allowedRoles":{"type":"array","items":{"type":"string"},"default":["district_admin"]},"isShared":{"type":"boolean","default":false},"schedule":{"type":"string","maxLength":100}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string"},"isShared":{"type":"boolean"},"allowedRoles":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","format":"uuid","nullable":true},"schedule":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"definition":{"type":"object","properties":{"scope":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["eq","neq","in","notIn","gt","gte","lt","lte","contains","startsWith","isNull","notNull"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["field","op"],"additionalProperties":false},"default":[]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"asc"}},"required":["field"],"additionalProperties":false},"default":[]},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000,"default":1000}},"required":["scope","fields"],"additionalProperties":false}},"required":["id","name","description","scope","isShared","allowedRoles","createdBy","schedule","createdAt","updatedAt","definition"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a saved custom report","tags":["Reports"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/custom/{id}/run":{"post":{"summary":"Execute a saved report and return the result set","tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"params":{"type":"object","additionalProperties":{}},"allowPii":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"durationMs":{"type":"integer"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["id","label","type"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"rowCount":{"type":"integer"},"truncated":{"type":"boolean"}},"required":["runId","durationMs","columns","rows","rowCount","truncated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/custom/{id}/export":{"get":{"summary":"Export a saved report as CSV","tags":["Reports"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"allowPii","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/custom/{id}/export.pdf":{"get":{"summary":"Export a saved report as a PDF on district letterhead","tags":["Reports"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"allowPii","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/reports/custom/{id}/duplicate":{"post":{"summary":"Duplicate a saved report","tags":["Reports"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string"},"isShared":{"type":"boolean"},"allowedRoles":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string","format":"uuid","nullable":true},"schedule":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","scope","isShared","allowedRoles","createdBy","schedule","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/export-schedules":{"get":{"summary":"List scheduled data-set exports","tags":["Reports"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"reportId":{"type":"string","format":"uuid"},"reportName":{"type":"string"},"reportScope":{"type":"string"},"name":{"type":"string"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"dayOfMonth":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"deliveryMethod":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"fileNamePattern":{"type":"string"},"columnMapping":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80},"column":{"type":"string","minLength":1,"maxLength":120}},"required":["field","column"],"additionalProperties":false},"maxItems":60,"nullable":true},"includePii":{"type":"boolean"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRowCount":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","reportId","reportName","reportScope","name","cadence","dayOfWeek","dayOfMonth","runAtLocal","timezone","deliveryMethod","recipients","fileNamePattern","columnMapping","includePii","isActive","lastRunAt","lastStatus","lastError","lastRowCount","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a saved report for recurring CSV delivery","tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"cadence":{"type":"string","enum":["daily","weekly","monthly"],"default":"weekly"},"dayOfWeek":{"type":"integer","minimum":1,"maximum":7},"dayOfMonth":{"type":"integer","minimum":1,"maximum":28},"runAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$","default":"06:00"},"timezone":{"type":"string","minLength":1,"maxLength":64,"default":"America/New_York"},"deliveryMethod":{"type":"string","enum":["email","download"],"default":"email"},"recipients":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20,"default":[]},"fileNamePattern":{"type":"string","minLength":1,"maxLength":200,"default":"{NAME}_{YYYY}{MM}{DD}.csv"},"columnMapping":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80},"column":{"type":"string","minLength":1,"maxLength":120}},"required":["field","column"],"additionalProperties":false},"maxItems":60},"includePii":{"type":"boolean","default":false}},"required":["reportId","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"reportId":{"type":"string","format":"uuid"},"reportName":{"type":"string"},"reportScope":{"type":"string"},"name":{"type":"string"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"dayOfMonth":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"deliveryMethod":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"fileNamePattern":{"type":"string"},"columnMapping":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80},"column":{"type":"string","minLength":1,"maxLength":120}},"required":["field","column"],"additionalProperties":false},"maxItems":60,"nullable":true},"includePii":{"type":"boolean"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRowCount":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","reportId","reportName","reportScope","name","cadence","dayOfWeek","dayOfMonth","runAtLocal","timezone","deliveryMethod","recipients","fileNamePattern","columnMapping","includePii","isActive","lastRunAt","lastStatus","lastError","lastRowCount","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/export-schedules/{id}":{"patch":{"summary":"Edit or pause a scheduled export","tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"dayOfWeek":{"type":"integer","minimum":1,"maximum":7,"nullable":true},"dayOfMonth":{"type":"integer","minimum":1,"maximum":28,"nullable":true},"runAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"timezone":{"type":"string","minLength":1,"maxLength":64},"deliveryMethod":{"type":"string","enum":["email","download"]},"recipients":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20},"fileNamePattern":{"type":"string","minLength":1,"maxLength":200},"columnMapping":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80},"column":{"type":"string","minLength":1,"maxLength":120}},"required":["field","column"],"additionalProperties":false},"maxItems":60,"nullable":true},"includePii":{"type":"boolean"},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"reportId":{"type":"string","format":"uuid"},"reportName":{"type":"string"},"reportScope":{"type":"string"},"name":{"type":"string"},"cadence":{"type":"string"},"dayOfWeek":{"type":"integer","nullable":true},"dayOfMonth":{"type":"integer","nullable":true},"runAtLocal":{"type":"string"},"timezone":{"type":"string"},"deliveryMethod":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"fileNamePattern":{"type":"string"},"columnMapping":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":80},"column":{"type":"string","minLength":1,"maxLength":120}},"required":["field","column"],"additionalProperties":false},"maxItems":60,"nullable":true},"includePii":{"type":"boolean"},"isActive":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"lastRowCount":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","reportId","reportName","reportScope","name","cadence","dayOfWeek","dayOfMonth","runAtLocal","timezone","deliveryMethod","recipients","fileNamePattern","columnMapping","includePii","isActive","lastRunAt","lastStatus","lastError","lastRowCount","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a scheduled export","tags":["Reports"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/reports/export-schedules/{id}/run-now":{"post":{"summary":"Run a scheduled export immediately","tags":["Reports"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/lookups/categories":{"get":{"summary":"List every lookup category available to this caller","tags":["Lookups"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Z]{2}$"},"in":"query","name":"state","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/lookups/{category}":{"get":{"summary":"Get the active options for a lookup category","tags":["Lookups"],"description":"Merges platform defaults → state defaults → district overrides. Sorted by sortOrder then label.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Z]{2}$"},"in":"query","name":"state","required":false},{"schema":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z][a-z0-9_]*$"},"in":"path","name":"category","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"category":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"scope":{"type":"string","enum":["platform","state","district"]}},"required":["code","label","description","sortOrder","metadata","scope"],"additionalProperties":false}}},"required":["category","options"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/transcript":{"get":{"summary":"Get a student’s transcript (registrar view)","tags":["Transcripts"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"summary":{"type":"object","properties":{"cumulativeGpa":{"type":"number","nullable":true},"cumulativeGpaWeighted":{"type":"number","nullable":true},"creditsEarned":{"type":"number"},"creditsNeeded":{"type":"number"},"classRank":{"type":"integer","nullable":true},"classRankSize":{"type":"integer","nullable":true},"honorRollLevel":{"type":"string","nullable":true}},"required":["cumulativeGpa","cumulativeGpaWeighted","creditsEarned","creditsNeeded","classRank","classRankSize","honorRollLevel"],"additionalProperties":false},"years":{"type":"array","items":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"schoolYearName":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"schoolYearName":{"type":"string"},"schoolName":{"type":"string"},"gradeLevel":{"type":"string"},"termLabel":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"subjectArea":{"type":"string"},"finalPercent":{"type":"number","nullable":true},"finalLetter":{"type":"string","nullable":true},"creditsAttempted":{"type":"number"},"creditsEarned":{"type":"number"},"gpaPoints":{"type":"number"},"gpaPointsWeighted":{"type":"number","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"source":{"type":"string"},"transferInDistrict":{"type":"string","nullable":true}},"required":["id","schoolYearId","schoolYearName","schoolName","gradeLevel","termLabel","courseCode","courseName","subjectArea","finalPercent","finalLetter","creditsAttempted","creditsEarned","gpaPoints","gpaPointsWeighted","isHonors","isAP","isIB","isDualEnrollment","source","transferInDistrict"],"additionalProperties":false}},"yearGpaUnweighted":{"type":"number","nullable":true},"yearGpaWeighted":{"type":"number","nullable":true},"yearCreditsEarned":{"type":"number"}},"required":["schoolYearId","schoolYearName","rows","yearGpaUnweighted","yearGpaWeighted","yearCreditsEarned"],"additionalProperties":false}}},"required":["student","summary","years"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{id}/transcript.pdf":{"get":{"summary":"Download a student’s transcript as a PDF","tags":["Transcripts"],"description":"Renders an official-style transcript PDF using pdf-lib. Single binary response with content-type application/pdf.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/student/me/transcript":{"get":{"summary":"Current student’s own transcript","tags":["Transcripts"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"summary":{"type":"object","properties":{"cumulativeGpa":{"type":"number","nullable":true},"cumulativeGpaWeighted":{"type":"number","nullable":true},"creditsEarned":{"type":"number"},"creditsNeeded":{"type":"number"},"classRank":{"type":"integer","nullable":true},"classRankSize":{"type":"integer","nullable":true},"honorRollLevel":{"type":"string","nullable":true}},"required":["cumulativeGpa","cumulativeGpaWeighted","creditsEarned","creditsNeeded","classRank","classRankSize","honorRollLevel"],"additionalProperties":false},"years":{"type":"array","items":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"schoolYearName":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"schoolYearName":{"type":"string"},"schoolName":{"type":"string"},"gradeLevel":{"type":"string"},"termLabel":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"subjectArea":{"type":"string"},"finalPercent":{"type":"number","nullable":true},"finalLetter":{"type":"string","nullable":true},"creditsAttempted":{"type":"number"},"creditsEarned":{"type":"number"},"gpaPoints":{"type":"number"},"gpaPointsWeighted":{"type":"number","nullable":true},"isHonors":{"type":"boolean"},"isAP":{"type":"boolean"},"isIB":{"type":"boolean"},"isDualEnrollment":{"type":"boolean"},"source":{"type":"string"},"transferInDistrict":{"type":"string","nullable":true}},"required":["id","schoolYearId","schoolYearName","schoolName","gradeLevel","termLabel","courseCode","courseName","subjectArea","finalPercent","finalLetter","creditsAttempted","creditsEarned","gpaPoints","gpaPointsWeighted","isHonors","isAP","isIB","isDualEnrollment","source","transferInDistrict"],"additionalProperties":false}},"yearGpaUnweighted":{"type":"number","nullable":true},"yearGpaWeighted":{"type":"number","nullable":true},"yearCreditsEarned":{"type":"number"}},"required":["schoolYearId","schoolYearName","rows","yearGpaUnweighted","yearGpaWeighted","yearCreditsEarned"],"additionalProperties":false}}},"required":["student","summary","years"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/honor-roll":{"get":{"summary":"District honor roll (current term, by cumulative GPA)","tags":["Transcripts"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"cumulativeGpa":{"type":"number","nullable":true},"honorRollLevel":{"type":"string","nullable":true},"classRank":{"type":"integer","nullable":true},"classRankSize":{"type":"integer","nullable":true}},"required":["studentPersonId","firstName","lastName","gradeLevel","cumulativeGpa","honorRollLevel","classRank","classRankSize"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/transcripts/backfill":{"post":{"summary":"Backfill academic records from SectionGrade for a school year","tags":["Transcripts"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"allYears":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentsProcessed":{"type":"integer"},"recordsUpserted":{"type":"integer"}},"required":["studentsProcessed","recordsUpserted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/transcripts/refresh-metrics":{"post":{"summary":"Recompute GPA / credits / class rank / honor roll for a cohort","tags":["Transcripts"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":5000}},"required":["studentIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentsProcessed":{"type":"integer"}},"required":["studentsProcessed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/report-cards/generate":{"post":{"summary":"Generate / refresh report cards for every student in a term","tags":["Report cards"],"description":"Idempotent: re-running refreshes snapshots but preserves ‘published’ status.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"}},"required":["termId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"studentsProcessed":{"type":"integer"},"reportCardsUpserted":{"type":"integer"}},"required":["termId","studentsProcessed","reportCardsUpserted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/report-cards/lock":{"post":{"summary":"Lock (freeze) all draft report cards in a term","tags":["Report cards"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"}},"required":["termId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locked":{"type":"integer"}},"required":["locked"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/report-cards/publish":{"post":{"summary":"Publish report cards to families (marks them as visible)","tags":["Report cards"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"}},"required":["termId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"published":{"type":"integer"}},"required":["published"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/report-cards":{"get":{"summary":"List report cards for a term (registrar view)","tags":["Report cards"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"status":{"type":"string"},"lockedAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"generatedByUserId":{"type":"string","format":"uuid","nullable":true},"snapshot":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","schoolName","smid"],"additionalProperties":false},"term":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"schoolYearName":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["id","name","schoolYearName","startDate","endDate"],"additionalProperties":false},"courses":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"gpaValue":{"type":"number","nullable":true},"missingAssignments":{"type":"integer"},"categoryBreakdown":{"type":"object","additionalProperties":{}},"comment":{"type":"string","nullable":true},"commentSource":{"type":"string","nullable":true}},"required":["sectionId","sectionCode","courseCode","courseName","teacherName","percentGrade","letterGrade","gpaValue","missingAssignments","categoryBreakdown","comment","commentSource"],"additionalProperties":false}},"attendance":{"type":"object","properties":{"present":{"type":"integer"},"absent":{"type":"integer"},"tardy":{"type":"integer"},"excused":{"type":"integer"},"total":{"type":"integer"},"rate":{"type":"number","nullable":true}},"required":["present","absent","tardy","excused","total","rate"],"additionalProperties":false},"summary":{"type":"object","properties":{"termGpa":{"type":"number","nullable":true},"termGpaWeighted":{"type":"number","nullable":true},"creditsAttempted":{"type":"number"},"totalMissing":{"type":"integer"},"coursesCount":{"type":"integer"}},"required":["termGpa","termGpaWeighted","creditsAttempted","totalMissing","coursesCount"],"additionalProperties":false}},"required":["student","term","courses","attendance","summary"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","termId","status","lockedAt","publishedAt","generatedByUserId","snapshot","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/report-cards":{"get":{"summary":"All report cards for a specific student","tags":["Report cards"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"status":{"type":"string"},"lockedAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"generatedByUserId":{"type":"string","format":"uuid","nullable":true},"snapshot":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","schoolName","smid"],"additionalProperties":false},"term":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"schoolYearName":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["id","name","schoolYearName","startDate","endDate"],"additionalProperties":false},"courses":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"gpaValue":{"type":"number","nullable":true},"missingAssignments":{"type":"integer"},"categoryBreakdown":{"type":"object","additionalProperties":{}},"comment":{"type":"string","nullable":true},"commentSource":{"type":"string","nullable":true}},"required":["sectionId","sectionCode","courseCode","courseName","teacherName","percentGrade","letterGrade","gpaValue","missingAssignments","categoryBreakdown","comment","commentSource"],"additionalProperties":false}},"attendance":{"type":"object","properties":{"present":{"type":"integer"},"absent":{"type":"integer"},"tardy":{"type":"integer"},"excused":{"type":"integer"},"total":{"type":"integer"},"rate":{"type":"number","nullable":true}},"required":["present","absent","tardy","excused","total","rate"],"additionalProperties":false},"summary":{"type":"object","properties":{"termGpa":{"type":"number","nullable":true},"termGpaWeighted":{"type":"number","nullable":true},"creditsAttempted":{"type":"number"},"totalMissing":{"type":"integer"},"coursesCount":{"type":"integer"}},"required":["termGpa","termGpaWeighted","creditsAttempted","totalMissing","coursesCount"],"additionalProperties":false}},"required":["student","term","courses","attendance","summary"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","termId","status","lockedAt","publishedAt","generatedByUserId","snapshot","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/report-cards/{termId}":{"get":{"summary":"Get a single report card for a student + term","tags":["Report cards"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"termId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"status":{"type":"string"},"lockedAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"generatedByUserId":{"type":"string","format":"uuid","nullable":true},"snapshot":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","schoolName","smid"],"additionalProperties":false},"term":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"schoolYearName":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["id","name","schoolYearName","startDate","endDate"],"additionalProperties":false},"courses":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"gpaValue":{"type":"number","nullable":true},"missingAssignments":{"type":"integer"},"categoryBreakdown":{"type":"object","additionalProperties":{}},"comment":{"type":"string","nullable":true},"commentSource":{"type":"string","nullable":true}},"required":["sectionId","sectionCode","courseCode","courseName","teacherName","percentGrade","letterGrade","gpaValue","missingAssignments","categoryBreakdown","comment","commentSource"],"additionalProperties":false}},"attendance":{"type":"object","properties":{"present":{"type":"integer"},"absent":{"type":"integer"},"tardy":{"type":"integer"},"excused":{"type":"integer"},"total":{"type":"integer"},"rate":{"type":"number","nullable":true}},"required":["present","absent","tardy","excused","total","rate"],"additionalProperties":false},"summary":{"type":"object","properties":{"termGpa":{"type":"number","nullable":true},"termGpaWeighted":{"type":"number","nullable":true},"creditsAttempted":{"type":"number"},"totalMissing":{"type":"integer"},"coursesCount":{"type":"integer"}},"required":["termGpa","termGpaWeighted","creditsAttempted","totalMissing","coursesCount"],"additionalProperties":false}},"required":["student","term","courses","attendance","summary"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","termId","status","lockedAt","publishedAt","generatedByUserId","snapshot","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/report-cards":{"get":{"summary":"Current student’s published report cards","tags":["Report cards"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"termId":{"type":"string","format":"uuid"},"status":{"type":"string"},"lockedAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"generatedByUserId":{"type":"string","format":"uuid","nullable":true},"snapshot":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","schoolName","smid"],"additionalProperties":false},"term":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"schoolYearName":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["id","name","schoolYearName","startDate","endDate"],"additionalProperties":false},"courses":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"sectionCode":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"percentGrade":{"type":"number","nullable":true},"letterGrade":{"type":"string","nullable":true},"gpaValue":{"type":"number","nullable":true},"missingAssignments":{"type":"integer"},"categoryBreakdown":{"type":"object","additionalProperties":{}},"comment":{"type":"string","nullable":true},"commentSource":{"type":"string","nullable":true}},"required":["sectionId","sectionCode","courseCode","courseName","teacherName","percentGrade","letterGrade","gpaValue","missingAssignments","categoryBreakdown","comment","commentSource"],"additionalProperties":false}},"attendance":{"type":"object","properties":{"present":{"type":"integer"},"absent":{"type":"integer"},"tardy":{"type":"integer"},"excused":{"type":"integer"},"total":{"type":"integer"},"rate":{"type":"number","nullable":true}},"required":["present","absent","tardy","excused","total","rate"],"additionalProperties":false},"summary":{"type":"object","properties":{"termGpa":{"type":"number","nullable":true},"termGpaWeighted":{"type":"number","nullable":true},"creditsAttempted":{"type":"number"},"totalMissing":{"type":"integer"},"coursesCount":{"type":"integer"}},"required":["termGpa","termGpaWeighted","creditsAttempted","totalMissing","coursesCount"],"additionalProperties":false}},"required":["student","term","courses","attendance","summary"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","termId","status","lockedAt","publishedAt","generatedByUserId","snapshot","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/sections/{id}/report-comments":{"get":{"summary":"List teacher comments for all students in a section + term","tags":["Report cards"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"termId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"comment":{"type":"string"},"source":{"type":"string"}},"required":["studentPersonId","comment","source"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/sections/{sectionId}/report-comments/{studentId}":{"put":{"summary":"Save / update a teacher comment for one student in one section","tags":["Report cards"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"comment":{"type":"string","minLength":1,"maxLength":2000},"source":{"type":"string","enum":["teacher","ai-draft","ai-approved"],"default":"teacher"},"aiCitations":{"type":"array","items":{}}},"required":["termId","comment"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"sectionId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/graduation-progress":{"get":{"summary":"Progress-to-graduation for a specific student (registrar / counselor view)","tags":["Graduation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"classYear":{"type":"integer"},"stateCode":{"type":"string"},"totals":{"type":"object","properties":{"required":{"type":"number"},"earned":{"type":"number"},"waived":{"type":"number"},"remaining":{"type":"number"},"percentComplete":{"type":"integer"}},"required":["required","earned","waived","remaining","percentComplete"],"additionalProperties":false},"subjects":{"type":"array","items":{"type":"object","properties":{"subjectArea":{"type":"string"},"label":{"type":"string"},"required":{"type":"number"},"earned":{"type":"number"},"waived":{"type":"number"},"remaining":{"type":"number"},"status":{"type":"string","enum":["met","on-track","short"]}},"required":["subjectArea","label","required","earned","waived","remaining","status"],"additionalProperties":false}},"waivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subjectArea":{"type":"string"},"creditsWaived":{"type":"number"},"reason":{"type":"string"},"waivedByUserId":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","subjectArea","creditsWaived","reason","waivedByUserId","occurredAt"],"additionalProperties":false}},"overallStatus":{"type":"string","enum":["met","on-track","at-risk","short"]}},"required":["student","classYear","stateCode","totals","subjects","waivers","overallStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/graduation-progress":{"get":{"summary":"Current student’s own progress-to-graduation","tags":["Graduation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"classYear":{"type":"integer"},"stateCode":{"type":"string"},"totals":{"type":"object","properties":{"required":{"type":"number"},"earned":{"type":"number"},"waived":{"type":"number"},"remaining":{"type":"number"},"percentComplete":{"type":"integer"}},"required":["required","earned","waived","remaining","percentComplete"],"additionalProperties":false},"subjects":{"type":"array","items":{"type":"object","properties":{"subjectArea":{"type":"string"},"label":{"type":"string"},"required":{"type":"number"},"earned":{"type":"number"},"waived":{"type":"number"},"remaining":{"type":"number"},"status":{"type":"string","enum":["met","on-track","short"]}},"required":["subjectArea","label","required","earned","waived","remaining","status"],"additionalProperties":false}},"waivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subjectArea":{"type":"string"},"creditsWaived":{"type":"number"},"reason":{"type":"string"},"waivedByUserId":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","subjectArea","creditsWaived","reason","waivedByUserId","occurredAt"],"additionalProperties":false}},"overallStatus":{"type":"string","enum":["met","on-track","at-risk","short"]}},"required":["student","classYear","stateCode","totals","subjects","waivers","overallStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/graduation/seniors":{"get":{"summary":"Senior roster with progress + status (registrar clearance view)","tags":["Graduation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"classYear":{"type":"integer"},"totals":{"type":"object","properties":{"required":{"type":"number"},"earned":{"type":"number"},"waived":{"type":"number"},"remaining":{"type":"number"},"percentComplete":{"type":"integer"}},"required":["required","earned","waived","remaining","percentComplete"],"additionalProperties":false},"overallStatus":{"type":"string","enum":["met","on-track","at-risk","short"]},"subjectsShort":{"type":"integer"}},"required":["studentPersonId","smid","firstName","lastName","classYear","totals","overallStatus","subjectsShort"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/graduation-waivers":{"post":{"summary":"Waive a subject-area credit requirement for a student","tags":["Graduation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subjectArea":{"type":"string","minLength":1,"maxLength":50},"creditsWaived":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":60},"reason":{"type":"string","minLength":5,"maxLength":500}},"required":["subjectArea","creditsWaived","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/students/{id}/504-plans":{"get":{"summary":"Plans for a specific student (current + history)","tags":["Section 504"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"status":{"type":"string"},"disability":{"type":"string"},"majorLifeActivity":{"type":"string"},"eligibilityDate":{"type":"string"},"planStartDate":{"type":"string"},"planEndDate":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"caseManagerPersonId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"parentalConsentOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true}},"required":["id","student","status","disability","majorLifeActivity","eligibilityDate","planStartDate","planEndDate","lastReviewDate","nextReviewDate","caseManagerPersonId","caseManagerName","parentalConsentOn","notes","accommodations","reviewDue","daysUntilReview"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/student/me/504-plans":{"get":{"summary":"Current student’s own 504 plans","tags":["Section 504"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"status":{"type":"string"},"disability":{"type":"string"},"majorLifeActivity":{"type":"string"},"eligibilityDate":{"type":"string"},"planStartDate":{"type":"string"},"planEndDate":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"caseManagerPersonId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"parentalConsentOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true}},"required":["id","student","status","disability","majorLifeActivity","eligibilityDate","planStartDate","planEndDate","lastReviewDate","nextReviewDate","caseManagerPersonId","caseManagerName","parentalConsentOn","notes","accommodations","reviewDue","daysUntilReview"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/teacher/sections/{id}/accommodations":{"get":{"summary":"Accommodations for the students in one of my sections","tags":["Section 504"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"planId":{"type":"string","format":"uuid"},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"testingAccommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"caseManager":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["name","email"],"additionalProperties":false,"nullable":true},"nextReviewDate":{"type":"string","nullable":true}},"required":["studentPersonId","firstName","lastName","gradeLevel","planId","accommodations","testingAccommodations","caseManager","nextReviewDate"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/504-plans":{"get":{"summary":"List every 504 plan in the district","tags":["Section 504"],"parameters":[{"schema":{"type":"string","enum":["draft","active","expired","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":365},"in":"query","name":"reviewWithinDays","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"status":{"type":"string"},"disability":{"type":"string"},"majorLifeActivity":{"type":"string"},"planStartDate":{"type":"string"},"planEndDate":{"type":"string"},"nextReviewDate":{"type":"string","nullable":true},"accommodationCount":{"type":"integer"},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true}},"required":["id","studentPersonId","smid","firstName","lastName","gradeLevel","status","disability","majorLifeActivity","planStartDate","planEndDate","nextReviewDate","accommodationCount","reviewDue","daysUntilReview"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Draft a new 504 plan after eligibility determination","tags":["Section 504"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"disability":{"type":"string","minLength":2,"maxLength":500},"majorLifeActivity":{"type":"string","minLength":2,"maxLength":300},"eligibilityDate":{"type":"string","format":"date"},"planStartDate":{"type":"string","format":"date"},"planEndDate":{"type":"string","format":"date"},"caseManagerPersonId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["studentPersonId","disability","majorLifeActivity","eligibilityDate","planStartDate","planEndDate"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/504-plans/{id}":{"get":{"summary":"Single plan with accommodations","tags":["Section 504"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"status":{"type":"string"},"disability":{"type":"string"},"majorLifeActivity":{"type":"string"},"eligibilityDate":{"type":"string"},"planStartDate":{"type":"string"},"planEndDate":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"caseManagerPersonId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"parentalConsentOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true}},"required":["id","student","status","disability","majorLifeActivity","eligibilityDate","planStartDate","planEndDate","lastReviewDate","nextReviewDate","caseManagerPersonId","caseManagerName","parentalConsentOn","notes","accommodations","reviewDue","daysUntilReview"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update plan metadata (status, end date, notes)","tags":["Section 504"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","expired","archived"]},"planEndDate":{"type":"string","format":"date"},"nextReviewDate":{"type":"string","format":"date","nullable":true},"caseManagerPersonId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/504-plans/{id}/review":{"post":{"summary":"Record the annual review meeting outcome","tags":["Section 504"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reviewDate":{"type":"string","format":"date"},"nextReviewDate":{"type":"string","format":"date"},"outcome":{"type":"string","enum":["continued","revised","terminated"]},"notes":{"type":"string","maxLength":5000}},"required":["reviewDate","nextReviewDate","outcome"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/504-plans/{id}/accommodations":{"post":{"summary":"Add an accommodation to a plan","tags":["Section 504"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["testing","instructional","environmental","behavioral","health","assistive-tech"]},"description":{"type":"string","minLength":3,"maxLength":2000},"frequency":{"type":"string","enum":["per-class","daily","as-needed","testing-only","weekly"]},"providerRole":{"type":"string","enum":["teacher","nurse","counselor","case-manager","administrator"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true}},"required":["category","description","frequency","providerRole","startDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/504-plans/{planId}/accommodations/{accId}/remove":{"post":{"summary":"Deactivate an accommodation (soft-remove)","tags":["Section 504"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"planId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"accId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/truancy/cases":{"get":{"summary":"District truancy caseload","tags":["Truancy"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"stage","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"status":{"type":"string"},"currentStage":{"type":"string"},"unexcusedCount":{"type":"integer"},"schoolYearName":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"lastLetterType":{"type":"string","nullable":true},"lastLetterSentAt":{"type":"string","format":"date-time","nullable":true},"lastLetterAcknowledgedAt":{"type":"string","format":"date-time","nullable":true},"courtReferralReady":{"type":"boolean"}},"required":["id","studentPersonId","smid","firstName","lastName","gradeLevel","status","currentStage","unexcusedCount","schoolYearName","openedAt","lastLetterType","lastLetterSentAt","lastLetterAcknowledgedAt","courtReferralReady"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/truancy/cases/{id}":{"get":{"summary":"One case with full letter history","tags":["Truancy"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"status":{"type":"string"},"currentStage":{"type":"string"},"unexcusedCount":{"type":"integer"},"schoolYearName":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"lastLetterType":{"type":"string","nullable":true},"lastLetterSentAt":{"type":"string","format":"date-time","nullable":true},"lastLetterAcknowledgedAt":{"type":"string","format":"date-time","nullable":true},"courtReferralReady":{"type":"boolean"},"letters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"letterType":{"type":"string"},"unexcusedCountAtSend":{"type":"integer"},"generatedAt":{"type":"string","format":"date-time"},"sentAt":{"type":"string","format":"date-time","nullable":true},"deliveryMethod":{"type":"string"},"parentAcknowledgedAt":{"type":"string","format":"date-time","nullable":true},"bodyMarkdown":{"type":"string"}},"required":["id","letterType","unexcusedCountAtSend","generatedAt","sentAt","deliveryMethod","parentAcknowledgedAt","bodyMarkdown"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true}},"required":["id","studentPersonId","smid","firstName","lastName","gradeLevel","status","currentStage","unexcusedCount","schoolYearName","openedAt","lastLetterType","lastLetterSentAt","lastLetterAcknowledgedAt","courtReferralReady","letters","notes","resolution"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/truancy/policy":{"get":{"summary":"District truancy policy (thresholds + letter templates)","tags":["Truancy"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"letter1Threshold":{"type":"integer"},"letter2Threshold":{"type":"integer"},"courtReferralThreshold":{"type":"integer"},"letter1Template":{"type":"string"},"letter2Template":{"type":"string"},"courtReferralTemplate":{"type":"string"}},"required":["id","letter1Threshold","letter2Threshold","courtReferralThreshold","letter1Template","letter2Template","courtReferralTemplate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update thresholds or letter templates","tags":["Truancy"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"letter1Threshold":{"type":"integer","minimum":1,"maximum":100},"letter2Threshold":{"type":"integer","minimum":1,"maximum":100},"courtReferralThreshold":{"type":"integer","minimum":1,"maximum":100},"letter1Template":{"type":"string","minLength":20,"maxLength":10000},"letter2Template":{"type":"string","minLength":20,"maxLength":10000},"courtReferralTemplate":{"type":"string","minLength":20,"maxLength":10000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/truancy/evaluate":{"post":{"summary":"Scan attendance and open/advance cases","tags":["Truancy"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"casesOpened":{"type":"integer"},"casesAdvanced":{"type":"integer"},"studentsScanned":{"type":"integer"}},"required":["casesOpened","casesAdvanced","studentsScanned"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/truancy/cases/{id}/generate-letter":{"post":{"summary":"Draft a letter of the specified tier for the case","tags":["Truancy"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"letterType":{"type":"string","enum":["letter1","letter2","court-referral"]}},"required":["letterType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"letterId":{"type":"string","format":"uuid"},"bodyMarkdown":{"type":"string"},"unexcusedCountAtSend":{"type":"integer"}},"required":["letterId","bodyMarkdown","unexcusedCountAtSend"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/truancy/letters/{id}/send":{"post":{"summary":"Mark a generated letter as sent via the chosen channel","tags":["Truancy"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryMethod":{"type":"string","enum":["mail","email","hand","home-visit"]}},"required":["deliveryMethod"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/truancy/letters/{id}/acknowledge":{"post":{"summary":"Record parent acknowledgement of a truancy letter","tags":["Truancy"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgedByPersonId":{"type":"string","format":"uuid"}},"required":["acknowledgedByPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/truancy/cases/{id}/resolve":{"post":{"summary":"Resolve a truancy case (attendance restored, transfer, etc.)","tags":["Truancy"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","minLength":3,"maxLength":500}},"required":["resolution"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/counselors/me/caseload":{"get":{"summary":"List the calling counselor's active caseload","tags":["Counselor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"counselorPersonId":{"type":"string","format":"uuid"},"counselorName":{"type":"string"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentLocalId":{"type":"string","nullable":true},"studentSmid":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isPrimary":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","counselorPersonId","counselorName","studentPersonId","studentName","studentLocalId","studentSmid","schoolId","schoolName","startDate","endDate","isPrimary","notes"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/counselors/{counselorPersonId}/caseload":{"get":{"summary":"List active caseload for a specific counselor","tags":["Counselor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"counselorPersonId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"counselorPersonId":{"type":"string","format":"uuid"},"counselorName":{"type":"string"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentLocalId":{"type":"string","nullable":true},"studentSmid":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isPrimary":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","counselorPersonId","counselorName","studentPersonId","studentName","studentLocalId","studentSmid","schoolId","schoolName","startDate","endDate","isPrimary","notes"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/counselors/unassigned":{"get":{"summary":"List active students with no current counselor assignment","tags":["Counselor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentLocalId":{"type":"string","nullable":true},"studentSmid":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["studentPersonId","studentName","studentLocalId","studentSmid","schoolId","schoolName","gradeLevel"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/counselors/caseload/assign":{"post":{"summary":"Assign a student to a counselor","tags":["Counselor"],"description":"Idempotent. If the same counselor↔student pair already has an active row, the existing row is end-dated and a new row is created so the change is auditable.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"counselorPersonId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"startDate":{"type":"string","format":"date"},"isPrimary":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":1000,"nullable":true}},"required":["counselorPersonId","studentPersonId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"counselorPersonId":{"type":"string","format":"uuid"},"counselorName":{"type":"string"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentLocalId":{"type":"string","nullable":true},"studentSmid":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"isPrimary":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","counselorPersonId","counselorName","studentPersonId","studentName","studentLocalId","studentSmid","schoolId","schoolName","startDate","endDate","isPrimary","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/counselors/caseload/{assignmentId}/unassign":{"post":{"summary":"End a counselor assignment","tags":["Counselor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endDate":{"type":"string","format":"date"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"assignmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/counselors/caseload/request":{"post":{"summary":"Counselor requests assignment of a specific student","tags":["Counselor"],"description":"Counselors cannot self-assign; this endpoint emits an event so a principal/school_admin can review and action it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["studentPersonId","reason"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"requested":{"type":"boolean","enum":[true]},"eventId":{"type":"string","format":"uuid"}},"required":["requested","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/teacher/sections/{id}/accommodations":{"get":{"summary":"Active IEP accommodations for students in this section","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"iepRecordId":{"type":"string","format":"uuid"},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"testingAccommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"caseManager":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["name","email"],"additionalProperties":false,"nullable":true},"nextReviewDate":{"type":"string","nullable":true}},"required":["studentPersonId","firstName","lastName","gradeLevel","iepRecordId","accommodations","testingAccommodations","caseManager","nextReviewDate"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/iep/referrals":{"get":{"summary":"List SPED referrals","tags":["IEP"],"parameters":[{"schema":{"type":"string","enum":["pending","in-evaluation","eligible","ineligible","withdrawn"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"referralDate":{"type":"string"},"referralSource":{"type":"string"},"status":{"type":"string"},"concerns":{"type":"string"},"evaluationsCompleted":{"type":"integer"},"evaluationsTotal":{"type":"integer"},"hasActiveIep":{"type":"boolean"}},"required":["id","studentPersonId","smid","firstName","lastName","gradeLevel","referralDate","referralSource","status","concerns","evaluationsCompleted","evaluationsTotal","hasActiveIep"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open a new SPED referral (Child Find)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string","enum":["teacher","parent","counselor","admin","doctor","outside-agency"]},"concerns":{"type":"string","minLength":10,"maxLength":5000},"referredByPersonId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["studentPersonId","referralDate","referralSource","concerns"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/iep/referrals/{id}":{"get":{"summary":"One referral with evaluations","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"referralDate":{"type":"string"},"referralSource":{"type":"string"},"referredByPersonId":{"type":"string","format":"uuid","nullable":true},"concerns":{"type":"string"},"status":{"type":"string"},"parentalConsentOn":{"type":"string","format":"date-time","nullable":true},"eligibilityDecisionDate":{"type":"string","nullable":true},"eligibilityDecision":{"type":"string","nullable":true},"eligibilityRationale":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"evaluations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"evaluationType":{"type":"string"},"evaluatorName":{"type":"string","nullable":true},"scheduledDate":{"type":"string","nullable":true},"completedDate":{"type":"string","nullable":true},"status":{"type":"string"},"findings":{"type":"string","nullable":true}},"required":["id","evaluationType","evaluatorName","scheduledDate","completedDate","status","findings"],"additionalProperties":false}},"iepRecordIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["id","student","referralDate","referralSource","referredByPersonId","concerns","status","parentalConsentOn","eligibilityDecisionDate","eligibilityDecision","eligibilityRationale","notes","evaluations","iepRecordIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update referral (status, consent, eligibility decision, notes)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","in-evaluation","eligible","ineligible","withdrawn"]},"parentalConsentOn":{"type":"string","format":"date-time","nullable":true},"eligibilityDecisionDate":{"type":"string","format":"date","nullable":true},"eligibilityDecision":{"type":"string","enum":["eligible","ineligible"],"nullable":true},"eligibilityRationale":{"type":"string","maxLength":5000,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/referrals/{id}/evaluations":{"post":{"summary":"Schedule an evaluation on a referral","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"evaluationType":{"type":"string","enum":["cognitive","academic","speech-language","ot-pt","behavioral","adaptive","medical","other"]},"evaluatorName":{"type":"string","maxLength":200,"nullable":true},"evaluatorPersonId":{"type":"string","format":"uuid","nullable":true},"scheduledDate":{"type":"string","format":"date","nullable":true}},"required":["evaluationType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/evaluations/{id}":{"patch":{"summary":"Update an evaluation (status, findings, completed date)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","in-progress","completed","cancelled"]},"completedDate":{"type":"string","format":"date","nullable":true},"findings":{"type":"string","maxLength":20000,"nullable":true},"reportUrl":{"type":"string","format":"uri","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans":{"get":{"summary":"List IEPs (district caseload)","tags":["IEP"],"parameters":[{"schema":{"type":"string","enum":["draft","active","expired","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":365},"in":"query","name":"reviewWithinDays","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"smid":{"type":"string","nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"status":{"type":"string"},"disabilityCategory":{"type":"string","nullable":true},"planStart":{"type":"string"},"planEnd":{"type":"string"},"nextReviewDate":{"type":"string","nullable":true},"reevaluationDueDate":{"type":"string","nullable":true},"goalCount":{"type":"integer"},"accommodationCount":{"type":"integer"},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true},"reevaluationDue":{"type":"string","enum":["ok","upcoming","overdue"]}},"required":["id","studentPersonId","smid","firstName","lastName","gradeLevel","status","disabilityCategory","planStart","planEnd","nextReviewDate","reevaluationDueDate","goalCount","accommodationCount","reviewDue","daysUntilReview","reevaluationDue"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Draft a new IEP after eligibility determination","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"referralId":{"type":"string","format":"uuid","nullable":true},"disabilityCategory":{"type":"string","maxLength":50},"secondaryDisabilityCategory":{"type":"string","maxLength":50,"nullable":true},"lreSetting":{"type":"string","enum":["regular_80_plus","regular_40_79","regular_under_40","separate_school","residential","homebound_hospital"]},"planStart":{"type":"string","format":"date"},"planEnd":{"type":"string","format":"date"},"caseManagerId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true}},"required":["studentPersonId","planStart","planEnd"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}":{"get":{"summary":"Single IEP with goals, services, accommodations","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"referralId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string"},"disabilityCategory":{"type":"string","nullable":true},"secondaryDisabilityCategory":{"type":"string","nullable":true},"lreSetting":{"type":"string","nullable":true},"planStart":{"type":"string"},"planEnd":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"reevaluationDueDate":{"type":"string","nullable":true},"caseManagerId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"goalArea":{"type":"string"},"statement":{"type":"string"},"measurableCriteria":{"type":"string"},"progressInterval":{"type":"string"},"targetDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","goalArea","statement","measurableCriteria","progressInterval","targetDate","isActive"],"additionalProperties":false}},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"serviceType":{"type":"string"},"providerRole":{"type":"string"},"providerName":{"type":"string","nullable":true},"frequencyMinutes":{"type":"integer"},"frequencyUnit":{"type":"string"},"settingCode":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","serviceType","providerRole","providerName","frequencyMinutes","frequencyUnit","settingCode","startDate","endDate","isActive","notes"],"additionalProperties":false}},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true},"reevaluationDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReevaluation":{"type":"integer","nullable":true}},"required":["id","student","referralId","status","disabilityCategory","secondaryDisabilityCategory","lreSetting","planStart","planEnd","lastReviewDate","nextReviewDate","reevaluationDueDate","caseManagerId","caseManagerName","notes","goals","services","accommodations","reviewDue","daysUntilReview","reevaluationDue","daysUntilReevaluation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update IEP metadata (status, disability, dates, notes)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","expired","archived"]},"disabilityCategory":{"type":"string","maxLength":50,"nullable":true},"secondaryDisabilityCategory":{"type":"string","maxLength":50,"nullable":true},"lreSetting":{"type":"string","enum":["regular_80_plus","regular_40_79","regular_under_40","separate_school","residential","homebound_hospital"],"nullable":true},"planEnd":{"type":"string","format":"date"},"nextReviewDate":{"type":"string","format":"date","nullable":true},"reevaluationDueDate":{"type":"string","format":"date","nullable":true},"caseManagerId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/students/{id}/plans":{"get":{"summary":"IEPs for a specific student (history)","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"referralId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string"},"disabilityCategory":{"type":"string","nullable":true},"secondaryDisabilityCategory":{"type":"string","nullable":true},"lreSetting":{"type":"string","nullable":true},"planStart":{"type":"string"},"planEnd":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"reevaluationDueDate":{"type":"string","nullable":true},"caseManagerId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"goalArea":{"type":"string"},"statement":{"type":"string"},"measurableCriteria":{"type":"string"},"progressInterval":{"type":"string"},"targetDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","goalArea","statement","measurableCriteria","progressInterval","targetDate","isActive"],"additionalProperties":false}},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"serviceType":{"type":"string"},"providerRole":{"type":"string"},"providerName":{"type":"string","nullable":true},"frequencyMinutes":{"type":"integer"},"frequencyUnit":{"type":"string"},"settingCode":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","serviceType","providerRole","providerName","frequencyMinutes","frequencyUnit","settingCode","startDate","endDate","isActive","notes"],"additionalProperties":false}},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true},"reevaluationDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReevaluation":{"type":"integer","nullable":true}},"required":["id","student","referralId","status","disabilityCategory","secondaryDisabilityCategory","lreSetting","planStart","planEnd","lastReviewDate","nextReviewDate","reevaluationDueDate","caseManagerId","caseManagerName","notes","goals","services","accommodations","reviewDue","daysUntilReview","reevaluationDue","daysUntilReevaluation"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/iep/student/me/plans":{"get":{"summary":"Current student’s own IEPs","tags":["IEP"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"student":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"smid":{"type":"string","nullable":true}},"required":["id","firstName","lastName","gradeLevel","smid"],"additionalProperties":false},"referralId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string"},"disabilityCategory":{"type":"string","nullable":true},"secondaryDisabilityCategory":{"type":"string","nullable":true},"lreSetting":{"type":"string","nullable":true},"planStart":{"type":"string"},"planEnd":{"type":"string"},"lastReviewDate":{"type":"string","nullable":true},"nextReviewDate":{"type":"string","nullable":true},"reevaluationDueDate":{"type":"string","nullable":true},"caseManagerId":{"type":"string","format":"uuid","nullable":true},"caseManagerName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"goalArea":{"type":"string"},"statement":{"type":"string"},"measurableCriteria":{"type":"string"},"progressInterval":{"type":"string"},"targetDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","goalArea","statement","measurableCriteria","progressInterval","targetDate","isActive"],"additionalProperties":false}},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"serviceType":{"type":"string"},"providerRole":{"type":"string"},"providerName":{"type":"string","nullable":true},"frequencyMinutes":{"type":"integer"},"frequencyUnit":{"type":"string"},"settingCode":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","serviceType","providerRole","providerName","frequencyMinutes","frequencyUnit","settingCode","startDate","endDate","isActive","notes"],"additionalProperties":false}},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"},"providerRole":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","category","description","frequency","providerRole","startDate","endDate","notes","isActive"],"additionalProperties":false}},"reviewDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReview":{"type":"integer","nullable":true},"reevaluationDue":{"type":"string","enum":["ok","upcoming","overdue"]},"daysUntilReevaluation":{"type":"integer","nullable":true}},"required":["id","student","referralId","status","disabilityCategory","secondaryDisabilityCategory","lreSetting","planStart","planEnd","lastReviewDate","nextReviewDate","reevaluationDueDate","caseManagerId","caseManagerName","notes","goals","services","accommodations","reviewDue","daysUntilReview","reevaluationDue","daysUntilReevaluation"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/review":{"post":{"summary":"Record the annual review meeting outcome","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reviewDate":{"type":"string","format":"date"},"nextReviewDate":{"type":"string","format":"date"},"outcome":{"type":"string","enum":["continued","revised","terminated"]},"notes":{"type":"string","maxLength":10000}},"required":["reviewDate","nextReviewDate","outcome"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/goals":{"post":{"summary":"Add a measurable annual goal to an IEP","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goalArea":{"type":"string","enum":["academic","behavioral","social-emotional","communication","adaptive","motor","functional","transition"]},"statement":{"type":"string","minLength":5,"maxLength":5000},"measurableCriteria":{"type":"string","minLength":5,"maxLength":5000},"progressInterval":{"type":"string","enum":["quarterly","trimester","monthly","weekly"],"default":"quarterly"},"targetDate":{"type":"string","format":"date","nullable":true}},"required":["goalArea","statement","measurableCriteria"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/goals/{id}/retire":{"post":{"summary":"Deactivate a goal (kept for history)","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/services":{"post":{"summary":"Add a related service (SLP, OT, PT, counseling, …) to an IEP","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"serviceType":{"type":"string","enum":["speech-language","occupational-therapy","physical-therapy","counseling","nursing","audiology","orientation-mobility","transportation","behavioral-support","interpretation","other"]},"providerRole":{"type":"string","maxLength":50},"providerName":{"type":"string","maxLength":200,"nullable":true},"frequencyMinutes":{"type":"integer","minimum":5,"maximum":6000},"frequencyUnit":{"type":"string","enum":["per-week","per-month","per-year"]},"settingCode":{"type":"string","enum":["general-ed","special-ed-pullout","separate-class","community","other"],"default":"general-ed"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true}},"required":["serviceType","providerRole","frequencyMinutes","frequencyUnit","startDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/services/{id}/retire":{"post":{"summary":"Deactivate an IEP service","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/accommodations":{"post":{"summary":"Add an accommodation to an IEP","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["testing","instructional","environmental","behavioral","health","assistive-tech"]},"description":{"type":"string","minLength":3,"maxLength":2000},"frequency":{"type":"string","enum":["per-class","daily","as-needed","testing-only","weekly"]},"providerRole":{"type":"string","enum":["teacher","nurse","counselor","case-manager","administrator"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true}},"required":["category","description","frequency","providerRole","startDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/accommodations/{id}/remove":{"post":{"summary":"Retire an IEP accommodation with reason","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/signatures":{"get":{"summary":"List signatures captured against an IEP plan","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepRecordId":{"type":"string","format":"uuid"},"signerPersonId":{"type":"string","format":"uuid"},"signerRole":{"type":"string"},"signatureType":{"type":"string"},"signedAt":{"type":"string","format":"date-time"},"contentHash":{"type":"string"},"documentUrl":{"type":"string","nullable":true},"attestedName":{"type":"string"},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedByPersonId":{"type":"string","format":"uuid","nullable":true},"revocationReason":{"type":"string","nullable":true}},"required":["id","iepRecordId","signerPersonId","signerRole","signatureType","signedAt","contentHash","documentUrl","attestedName","revokedAt","revokedByPersonId","revocationReason"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Capture a typed-name signature against an IEP (consent, agreement, attendance, amendment)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signerPersonId":{"type":"string","format":"uuid"},"signerRole":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"signatureType":{"type":"string","enum":["consent_to_evaluate","consent_to_placement","plan_agreement","meeting_attendance","annual_review","amendment"]},"attestedName":{"type":"string","minLength":2,"maxLength":200},"documentUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"metadataOverride":{"type":"object","properties":{"userAgent":{"type":"string","maxLength":512},"ipAddress":{"type":"string","maxLength":64}},"additionalProperties":false}},"required":["signerPersonId","signerRole","signatureType","attestedName"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepRecordId":{"type":"string","format":"uuid"},"signerPersonId":{"type":"string","format":"uuid"},"signerRole":{"type":"string"},"signatureType":{"type":"string"},"signedAt":{"type":"string","format":"date-time"},"contentHash":{"type":"string"},"documentUrl":{"type":"string","nullable":true},"attestedName":{"type":"string"},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedByPersonId":{"type":"string","format":"uuid","nullable":true},"revocationReason":{"type":"string","nullable":true}},"required":["id","iepRecordId","signerPersonId","signerRole","signatureType","signedAt","contentHash","documentUrl","attestedName","revokedAt","revokedByPersonId","revocationReason"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/signatures/{id}/revoke":{"post":{"summary":"Revoke a previously captured IEP signature","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/meetings":{"get":{"summary":"List IEP team meetings for a plan","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepRecordId":{"type":"string","format":"uuid"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"durationMinutes":{"type":"integer","nullable":true},"location":{"type":"string","nullable":true},"locationType":{"type":"string"},"invitedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"presentAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"excusedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"agenda":{"type":"string","nullable":true},"minutes":{"type":"string","nullable":true},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string"},"voteOrConsensus":{"type":"string"},"rationale":{"type":"string"}},"required":["decision","voteOrConsensus"],"additionalProperties":false},"nullable":true},"actionItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"ownerPersonId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"completedAt":{"type":"string","format":"date-time"}},"required":["description"],"additionalProperties":false},"nullable":true},"nextMeetingDate":{"type":"string","nullable":true},"noticeSentAt":{"type":"string","format":"date-time","nullable":true},"noticeMethod":{"type":"string","nullable":true},"interpreterProvided":{"type":"boolean"},"interpreterLanguage":{"type":"string","nullable":true},"noticeWindowOk":{"type":"boolean"},"daysNotice":{"type":"integer","nullable":true}},"required":["id","iepRecordId","meetingType","scheduledAt","heldAt","durationMinutes","location","locationType","invitedAttendees","presentAttendees","excusedAttendees","agenda","minutes","decisions","actionItems","nextMeetingDate","noticeSentAt","noticeMethod","interpreterProvided","interpreterLanguage","noticeWindowOk","daysNotice"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule an IEP team meeting (IDEA 10-day notice)","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"meetingType":{"type":"string","enum":["initial_eligibility","initial_plan","annual_review","reevaluation","amendment","transition_planning","manifestation_determination","dismissal","other"]},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","maxLength":200,"nullable":true},"locationType":{"type":"string","enum":["in_person","video","phone","hybrid"],"default":"in_person"},"invitedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false},"default":[]},"agenda":{"type":"string","maxLength":10000,"nullable":true},"noticeSentAt":{"type":"string","format":"date-time","nullable":true},"noticeMethod":{"type":"string","enum":["email","portal","postal","hand_delivery","phone"],"nullable":true},"interpreterProvided":{"type":"boolean","default":false},"interpreterLanguage":{"type":"string","maxLength":50,"nullable":true}},"required":["meetingType","scheduledAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/meetings/{id}":{"patch":{"summary":"Update meeting attendance / minutes / outcomes. Setting `heldAt` emits IepMeeting.Held.","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"durationMinutes":{"type":"integer","minimum":0,"maximum":1440,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"locationType":{"type":"string","enum":["in_person","video","phone","hybrid"]},"invitedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"presentAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"excusedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"agenda":{"type":"string","maxLength":10000,"nullable":true},"minutes":{"type":"string","maxLength":50000,"nullable":true},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","minLength":1,"maxLength":500},"voteOrConsensus":{"type":"string","minLength":1,"maxLength":50},"rationale":{"type":"string","maxLength":2000}},"required":["decision","voteOrConsensus"],"additionalProperties":false},"nullable":true},"actionItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"ownerPersonId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"completedAt":{"type":"string","format":"date-time"}},"required":["description"],"additionalProperties":false},"nullable":true},"nextMeetingDate":{"type":"string","format":"date","nullable":true},"noticeSentAt":{"type":"string","format":"date-time","nullable":true},"noticeMethod":{"type":"string","enum":["email","portal","postal","hand_delivery","phone"],"nullable":true},"interpreterProvided":{"type":"boolean"},"interpreterLanguage":{"type":"string","maxLength":50,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepRecordId":{"type":"string","format":"uuid"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"heldAt":{"type":"string","format":"date-time","nullable":true},"durationMinutes":{"type":"integer","nullable":true},"location":{"type":"string","nullable":true},"locationType":{"type":"string"},"invitedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"presentAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"excusedAttendees":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["parent_guardian","student","case_manager","administrator","gen_ed_teacher","special_ed_teacher","related_service_provider","district_rep","lea_rep","evaluator","interpreter","other"]},"notifiedAt":{"type":"string","format":"date-time"},"joinedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time"},"reason":{"type":"string","maxLength":500},"writtenExcusalOn":{"type":"string","format":"date"}},"required":["name","role"],"additionalProperties":false}},"agenda":{"type":"string","nullable":true},"minutes":{"type":"string","nullable":true},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string"},"voteOrConsensus":{"type":"string"},"rationale":{"type":"string"}},"required":["decision","voteOrConsensus"],"additionalProperties":false},"nullable":true},"actionItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"ownerPersonId":{"type":"string","format":"uuid"},"dueDate":{"type":"string","format":"date"},"completedAt":{"type":"string","format":"date-time"}},"required":["description"],"additionalProperties":false},"nullable":true},"nextMeetingDate":{"type":"string","nullable":true},"noticeSentAt":{"type":"string","format":"date-time","nullable":true},"noticeMethod":{"type":"string","nullable":true},"interpreterProvided":{"type":"boolean"},"interpreterLanguage":{"type":"string","nullable":true},"noticeWindowOk":{"type":"boolean"},"daysNotice":{"type":"integer","nullable":true}},"required":["id","iepRecordId","meetingType","scheduledAt","heldAt","durationMinutes","location","locationType","invitedAttendees","presentAttendees","excusedAttendees","agenda","minutes","decisions","actionItems","nextMeetingDate","noticeSentAt","noticeMethod","interpreterProvided","interpreterLanguage","noticeWindowOk","daysNotice"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/goals/{id}/progress":{"get":{"summary":"List progress notes for a specific goal","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepGoalId":{"type":"string","format":"uuid"},"observationDate":{"type":"string"},"reportingPeriod":{"type":"string"},"progressStatus":{"type":"string"},"dataPoint":{"type":"number","nullable":true},"dataPointUnit":{"type":"string","nullable":true},"trialsAdministered":{"type":"integer","nullable":true},"trialsSuccessful":{"type":"integer","nullable":true},"narrative":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","nullable":true},"reportedByPersonId":{"type":"string","format":"uuid"},"reportedByName":{"type":"string","nullable":true},"sharedWithParentAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","iepGoalId","observationDate","reportingPeriod","progressStatus","dataPoint","dataPointUnit","trialsAdministered","trialsSuccessful","narrative","evidenceUrl","reportedByPersonId","reportedByName","sharedWithParentAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a progress observation against a goal","tags":["IEP"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"observationDate":{"type":"string","format":"date"},"reportingPeriod":{"type":"string","enum":["Q1","Q2","Q3","Q4","T1","T2","T3","M1","M2","M3","M4","M5","M6","M7","M8","M9","M10","M11","M12","weekly","as_needed"]},"progressStatus":{"type":"string","enum":["not_started","emerging","making_progress","mastered","not_making_progress","regressed","discontinued"]},"dataPoint":{"type":"number","minimum":-1000000,"maximum":1000000,"nullable":true},"dataPointUnit":{"type":"string","maxLength":30,"nullable":true},"trialsAdministered":{"type":"integer","minimum":0,"maximum":10000,"nullable":true},"trialsSuccessful":{"type":"integer","minimum":0,"maximum":10000,"nullable":true},"narrative":{"type":"string","maxLength":10000,"nullable":true},"evidenceUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true}},"required":["observationDate","reportingPeriod","progressStatus"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/plans/{id}/progress":{"get":{"summary":"List all progress notes across every goal on a plan (reverse-chron).","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"iepGoalId":{"type":"string","format":"uuid"},"observationDate":{"type":"string"},"reportingPeriod":{"type":"string"},"progressStatus":{"type":"string"},"dataPoint":{"type":"number","nullable":true},"dataPointUnit":{"type":"string","nullable":true},"trialsAdministered":{"type":"integer","nullable":true},"trialsSuccessful":{"type":"integer","nullable":true},"narrative":{"type":"string","nullable":true},"evidenceUrl":{"type":"string","nullable":true},"reportedByPersonId":{"type":"string","format":"uuid"},"reportedByName":{"type":"string","nullable":true},"sharedWithParentAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","iepGoalId","observationDate","reportingPeriod","progressStatus","dataPoint","dataPointUnit","trialsAdministered","trialsSuccessful","narrative","evidenceUrl","reportedByPersonId","reportedByName","sharedWithParentAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/iep/progress-notes/{id}/share-with-parent":{"patch":{"summary":"Mark a progress note as included in a periodic parent report (sets sharedWithParentAt).","tags":["IEP"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sharedAt":{"type":"string","format":"date-time"}},"required":["ok","sharedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/routes":{"get":{"summary":"List bus routes","tags":["Transportation"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"in":"query","name":"direction","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"name":{"type":"string"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","nullable":true},"driverName":{"type":"string","nullable":true},"driverPhone":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","nullable":true},"amArriveTime":{"type":"string","nullable":true},"pmDepartTime":{"type":"string","nullable":true},"pmArriveTime":{"type":"string","nullable":true},"runDays":{"type":"string","nullable":true},"vehicle":{"type":"object","properties":{"id":{"type":"string"},"busNumber":{"type":"string"},"status":{"type":"string"},"capacity":{"type":"integer","nullable":true}},"required":["id","busNumber","status","capacity"],"additionalProperties":false,"nullable":true},"driver":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"aide":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"stopCount":{"type":"integer"},"activeAssignmentCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","routeNumber","name","direction","schoolId","busNumber","driverName","driverPhone","capacity","isActive","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a bus route (emits BusRouteCreated)","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"routeNumber":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"],"default":"both"},"schoolId":{"type":"string","format":"uuid"},"busNumber":{"type":"string","maxLength":30},"driverName":{"type":"string","maxLength":200},"driverPhone":{"type":"string","maxLength":30},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0},"notes":{"type":"string","maxLength":2000},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"amArriveTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmDepartTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmArriveTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"runDays":{"type":"string","pattern":"^[MTWRF]{0,5}$","nullable":true},"stops":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","minimum":1},"address":{"type":"string","minLength":3,"maxLength":500},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"notes":{"type":"string","maxLength":500}},"required":["sequence","address"],"additionalProperties":false},"default":[]}},"required":["routeNumber","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"name":{"type":"string"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","nullable":true},"driverName":{"type":"string","nullable":true},"driverPhone":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","nullable":true},"amArriveTime":{"type":"string","nullable":true},"pmDepartTime":{"type":"string","nullable":true},"pmArriveTime":{"type":"string","nullable":true},"runDays":{"type":"string","nullable":true},"vehicle":{"type":"object","properties":{"id":{"type":"string"},"busNumber":{"type":"string"},"status":{"type":"string"},"capacity":{"type":"integer","nullable":true}},"required":["id","busNumber","status","capacity"],"additionalProperties":false,"nullable":true},"driver":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"aide":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"stopCount":{"type":"integer"},"activeAssignmentCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeId":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"address":{"type":"string"},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","nullable":true},"pmTime":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","routeId","sequence","address","scheduledTime","latitude","longitude","notes"],"additionalProperties":false}}},"required":["id","routeNumber","name","direction","schoolId","busNumber","driverName","driverPhone","capacity","isActive","notes","createdAt","updatedAt","stops"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/routes/{id}":{"get":{"summary":"Get a bus route with its stops","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"name":{"type":"string"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","nullable":true},"driverName":{"type":"string","nullable":true},"driverPhone":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","nullable":true},"amArriveTime":{"type":"string","nullable":true},"pmDepartTime":{"type":"string","nullable":true},"pmArriveTime":{"type":"string","nullable":true},"runDays":{"type":"string","nullable":true},"vehicle":{"type":"object","properties":{"id":{"type":"string"},"busNumber":{"type":"string"},"status":{"type":"string"},"capacity":{"type":"integer","nullable":true}},"required":["id","busNumber","status","capacity"],"additionalProperties":false,"nullable":true},"driver":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"aide":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"stopCount":{"type":"integer"},"activeAssignmentCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeId":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"address":{"type":"string"},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","nullable":true},"pmTime":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","routeId","sequence","address","scheduledTime","latitude","longitude","notes"],"additionalProperties":false}}},"required":["id","routeNumber","name","direction","schoolId","busNumber","driverName","driverPhone","capacity","isActive","notes","createdAt","updatedAt","stops"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a bus route (emits BusRouteUpdated)","tags":["Transportation"],"description":"Passing `stops` replaces the stop list — requires that there be no active assignments on the route. Omit `stops` to keep the current list unchanged.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"routeNumber":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","maxLength":30,"nullable":true},"driverName":{"type":"string","maxLength":200,"nullable":true},"driverPhone":{"type":"string","maxLength":30,"nullable":true},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0,"nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"amArriveTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmDepartTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmArriveTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"runDays":{"type":"string","pattern":"^[MTWRF]{0,5}$","nullable":true},"stops":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","minimum":1},"address":{"type":"string","minLength":3,"maxLength":500},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"pmTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","nullable":true},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"notes":{"type":"string","maxLength":500}},"required":["sequence","address"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"name":{"type":"string"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","nullable":true},"driverName":{"type":"string","nullable":true},"driverPhone":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","nullable":true},"amArriveTime":{"type":"string","nullable":true},"pmDepartTime":{"type":"string","nullable":true},"pmArriveTime":{"type":"string","nullable":true},"runDays":{"type":"string","nullable":true},"vehicle":{"type":"object","properties":{"id":{"type":"string"},"busNumber":{"type":"string"},"status":{"type":"string"},"capacity":{"type":"integer","nullable":true}},"required":["id","busNumber","status","capacity"],"additionalProperties":false,"nullable":true},"driver":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"aide":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"stopCount":{"type":"integer"},"activeAssignmentCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeId":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"address":{"type":"string"},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","nullable":true},"pmTime":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","routeId","sequence","address","scheduledTime","latitude","longitude","notes"],"additionalProperties":false}}},"required":["id","routeNumber","name","direction","schoolId","busNumber","driverName","driverPhone","capacity","isActive","notes","createdAt","updatedAt","stops"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/routes/{id}/deactivate":{"post":{"summary":"Retire a bus route (emits BusRouteDeactivated)","tags":["Transportation"],"description":"Marks the route inactive so no new assignments can be attached. Existing assignments remain historical. Refuses if the route already has active assignments — end them first.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"name":{"type":"string"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"schoolId":{"type":"string","format":"uuid","nullable":true},"busNumber":{"type":"string","nullable":true},"driverName":{"type":"string","nullable":true},"driverPhone":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"vehicleId":{"type":"string","format":"uuid","nullable":true},"driverId":{"type":"string","format":"uuid","nullable":true},"aideId":{"type":"string","format":"uuid","nullable":true},"amDepartTime":{"type":"string","nullable":true},"amArriveTime":{"type":"string","nullable":true},"pmDepartTime":{"type":"string","nullable":true},"pmArriveTime":{"type":"string","nullable":true},"runDays":{"type":"string","nullable":true},"vehicle":{"type":"object","properties":{"id":{"type":"string"},"busNumber":{"type":"string"},"status":{"type":"string"},"capacity":{"type":"integer","nullable":true}},"required":["id","busNumber","status","capacity"],"additionalProperties":false,"nullable":true},"driver":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"aide":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string","nullable":true}},"required":["id","name","phone"],"additionalProperties":false,"nullable":true},"stopCount":{"type":"integer"},"activeAssignmentCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"routeId":{"type":"string","format":"uuid"},"sequence":{"type":"integer"},"address":{"type":"string"},"scheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"amTime":{"type":"string","nullable":true},"pmTime":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","routeId","sequence","address","scheduledTime","latitude","longitude","notes"],"additionalProperties":false}}},"required":["id","routeNumber","name","direction","schoolId","busNumber","driverName","driverPhone","capacity","isActive","notes","createdAt","updatedAt","stops"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/assignments":{"get":{"summary":"List route assignments","tags":["Transportation"],"description":"Default is active-only (no effectiveTo or effectiveTo in the future). Pass ?activeOnly=false to include history.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"routeId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"specialEdOnly","required":false},{"schema":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"in":"query","name":"direction","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Assign a student to a route (emits StudentAssignedToRoute)","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"routeId":{"type":"string","format":"uuid"},"stopId":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"],"default":"both"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"isSpecialEd":{"type":"boolean","default":false},"accommodations":{"type":"string","maxLength":1000},"notes":{"type":"string","maxLength":1000}},"required":["studentId","routeId","stopId","effectiveFrom"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/assignments/{id}":{"get":{"summary":"Get a route assignment","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/assignments/{id}/end":{"post":{"summary":"End an assignment (emits StudentUnassignedFromRoute)","tags":["Transportation"],"description":"Stamps `effectiveTo` so the student no longer appears on the active manifest. Historical data stays on file. Defaults to today if `endedOn` is omitted.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endedOn":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/alternate-pickups":{"get":{"summary":"List alternate-pickup requests","tags":["Transportation"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["pending","approved","denied"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"pendingOnly","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"activeOn","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Request an alternate pickup (emits AlternatePickupRequested)","tags":["Transportation"],"description":"Opens a request in `pending` status. A district user reviews via /approve or /deny. Requests cannot overlap an existing pending/approved window for the same student.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":3,"maxLength":500},"authorizedByGuardianId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":2000}},"required":["studentId","effectiveFrom","effectiveTo","pickupAddress","reason"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/alternate-pickups/{id}":{"get":{"summary":"Get an alternate-pickup request","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/alternate-pickups/{id}/approve":{"post":{"summary":"Approve an alternate-pickup request (emits AlternatePickupApproved)","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/alternate-pickups/{id}/deny":{"post":{"summary":"Deny an alternate-pickup request (emits AlternatePickupDenied)","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/field-trips":{"get":{"summary":"List field trips","tags":["Transportation"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a field trip (emits FieldTripScheduled)","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string","minLength":3,"maxLength":500},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","maxLength":30},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false},"default":[]},"notes":{"type":"string","maxLength":2000}},"required":["tripDate","destination","departureTime","returnTime"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"roster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fieldTripId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"permissionSlipOn":{"type":"string","format":"date","nullable":true},"boarded":{"type":"boolean"},"boardedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fieldTripId","studentPersonId","permissionSlipOn","boarded","boardedAt","notes"],"additionalProperties":false}}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/field-trips/{id}":{"get":{"summary":"Get a field trip with its roster","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"roster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fieldTripId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"permissionSlipOn":{"type":"string","format":"date","nullable":true},"boarded":{"type":"boolean"},"boardedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fieldTripId","studentPersonId","permissionSlipOn","boarded","boardedAt","notes"],"additionalProperties":false}}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a field trip","tags":["Transportation"],"description":"Status transitions emit FieldTripStatusChanged. Other edits are logged as regular updates.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","minLength":3,"maxLength":500},"tripDate":{"type":"string","format":"date"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","maxLength":30,"nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"roster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fieldTripId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"permissionSlipOn":{"type":"string","format":"date","nullable":true},"boarded":{"type":"boolean"},"boardedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fieldTripId","studentPersonId","permissionSlipOn","boarded","boardedAt","notes"],"additionalProperties":false}}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/field-trips/{id}/roster":{"patch":{"summary":"Add or remove students from the field-trip roster","tags":["Transportation"],"description":"Emits FieldTripRosterUpdated when any students were added or removed. Duplicates in `add` are silently ignored (the unique constraint covers it).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"remove":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"roster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fieldTripId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"permissionSlipOn":{"type":"string","format":"date","nullable":true},"boarded":{"type":"boolean"},"boardedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fieldTripId","studentPersonId","permissionSlipOn","boarded","boardedAt","notes"],"additionalProperties":false}}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/field-trips/{id}/roster/{rosterId}/board":{"post":{"summary":"Mark a roster row as boarded / not boarded","tags":["Transportation"],"description":"Used at bus-loading time to tick off each student. Does not emit a separate event — boarding counts roll up on the trip read.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"boarded":{"type":"boolean"}},"required":["boarded"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"rosterId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"tripDate":{"type":"string","format":"date"},"destination":{"type":"string"},"departureTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"busNumber":{"type":"string","nullable":true},"chaperones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","maxLength":30},"personId":{"type":"string","format":"uuid"}},"required":["name"],"additionalProperties":false}},"status":{"type":"string","enum":["planned","confirmed","completed","cancelled"]},"notes":{"type":"string","nullable":true},"rosterCount":{"type":"integer"},"boardedCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"roster":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fieldTripId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"permissionSlipOn":{"type":"string","format":"date","nullable":true},"boarded":{"type":"boolean"},"boardedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fieldTripId","studentPersonId","permissionSlipOn","boarded","boardedAt","notes"],"additionalProperties":false}}},"required":["id","schoolId","tripDate","destination","departureTime","returnTime","busNumber","chaperones","status","notes","createdAt","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/transportation":{"get":{"summary":"A guardianed student's bus assignment + any alternate pickups","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false}},"alternatePickups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false}}},"required":["assignments","alternatePickups"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/transportation":{"get":{"summary":"The signed-in student's bus assignment + any alternate pickups","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"routeId":{"type":"string","format":"uuid"},"routeNumber":{"type":"string"},"routeName":{"type":"string"},"stopId":{"type":"string","format":"uuid"},"stopSequence":{"type":"integer"},"stopAddress":{"type":"string"},"stopScheduledTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"direction":{"type":"string","enum":["am_pickup","pm_dropoff","both"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"isSpecialEd":{"type":"boolean"},"accommodations":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","routeId","stopId","direction","effectiveFrom","effectiveTo","isSpecialEd","accommodations","notes","createdAt"],"additionalProperties":false}},"alternatePickups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false}}},"required":["assignments","alternatePickups"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/alternate-pickups":{"post":{"summary":"Guardian opens an alternate-pickup request (emits AlternatePickupRequested)","tags":["Parent Portal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":3,"maxLength":500},"authorizedByGuardianId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":2000}},"required":["effectiveFrom","effectiveTo","pickupAddress","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"pickupAddress":{"type":"string"},"reason":{"type":"string"},"authorizedByGuardianId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","approved","denied"]},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","effectiveFrom","effectiveTo","pickupAddress","reason","authorizedByGuardianId","status","approvedByUserId","approvedAt","denyReason","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/applications":{"get":{"summary":"List meal-benefits applications","tags":["Food Service"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"applicantPersonId","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Submit a meal-benefits application (emits MealApplicationSubmitted)","tags":["Food Service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicantPersonId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"householdSize":{"type":"integer","minimum":1,"maximum":30},"householdIncomeCents":{"type":"integer","minimum":0},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"],"default":"income"},"basisCaseNumber":{"type":"string","maxLength":50},"signatureOn":{"type":"string","format":"date"},"members":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"fullName":{"type":"string","minLength":1,"maxLength":200},"relationship":{"type":"string","maxLength":50},"isStudent":{"type":"boolean","default":false},"incomeCents":{"type":"integer","minimum":0,"default":0}},"required":["fullName"],"additionalProperties":false},"minItems":1,"maxItems":30},"notes":{"type":"string","maxLength":2000}},"required":["applicantPersonId","householdSize","householdIncomeCents","incomeFrequency","members"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"fullName":{"type":"string"},"relationship":{"type":"string","nullable":true},"isStudent":{"type":"boolean"},"incomeCents":{"type":"integer"}},"required":["id","applicationId","studentPersonId","fullName","relationship","isStudent","incomeCents"],"additionalProperties":false}}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/applications/{id}":{"get":{"summary":"Get a meal-benefits application with its members","tags":["Food Service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"fullName":{"type":"string"},"relationship":{"type":"string","nullable":true},"isStudent":{"type":"boolean"},"incomeCents":{"type":"integer"}},"required":["id","applicationId","studentPersonId","fullName","relationship","isStudent","incomeCents"],"additionalProperties":false}}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/applications/{id}/approve":{"post":{"summary":"Approve an application and stamp eligibility for covered students","tags":["Food Service"],"description":"Derives the NSLP category from the household income (or honors a categorical basis). Writes a MealEligibility row and a MealAccount for every student member. Emits MealApplicationApproved + MealEligibilitySet per student.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overrideCategory":{"type":"string","enum":["free","reduced","paid"]},"effectiveFrom":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"fullName":{"type":"string"},"relationship":{"type":"string","nullable":true},"isStudent":{"type":"boolean"},"incomeCents":{"type":"integer"}},"required":["id","applicationId","studentPersonId","fullName","relationship","isStudent","incomeCents"],"additionalProperties":false}}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/applications/{id}/deny":{"post":{"summary":"Deny an application (emits MealApplicationDenied)","tags":["Food Service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"fullName":{"type":"string"},"relationship":{"type":"string","nullable":true},"isStudent":{"type":"boolean"},"incomeCents":{"type":"integer"}},"required":["id","applicationId","studentPersonId","fullName","relationship","isStudent","incomeCents"],"additionalProperties":false}}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/eligibility":{"get":{"summary":"List per-student meal eligibility records","tags":["Food Service"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["free","reduced","paid"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"in":"query","name":"basis","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"activeOn","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"category":{"type":"string","enum":["free","reduced","paid"]},"basis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"applicationId":{"type":"string","format":"uuid","nullable":true},"directCertMatchedOn":{"type":"string","format":"date","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","schoolYearId","category","basis","applicationId","directCertMatchedOn","effectiveFrom","effectiveTo","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Write a per-student eligibility record (emits MealEligibilitySet)","tags":["Food Service"],"description":"Used for direct-certification matches, CEP-district bulk writes, and manual corrections. Open records for the student in the same window are ended at effectiveFrom. Ensures a meal account exists.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["free","reduced","paid"]},"basis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"schoolYearId":{"type":"string","format":"uuid"},"directCertMatchedOn":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":500}},"required":["studentId","category","basis","effectiveFrom"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"category":{"type":"string","enum":["free","reduced","paid"]},"basis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"applicationId":{"type":"string","format":"uuid","nullable":true},"directCertMatchedOn":{"type":"string","format":"date","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","schoolYearId","category","basis","applicationId","directCertMatchedOn","effectiveFrom","effectiveTo","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/eligibility/summary":{"get":{"summary":"Eligibility category distribution + ISEP","tags":["Food Service"],"description":"Counts active students in each NSLP category (free / reduced / paid) and the Identified Student Percentage (ISEP). ISEP drives whether the district can apply for Community Eligibility Provision (CEP).","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"activeOn","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"free":{"type":"integer"},"reduced":{"type":"integer"},"paid":{"type":"integer"},"total":{"type":"integer"},"isep":{"type":"number"}},"required":["free","reduced","paid","total","isep"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/eligibility/{id}/end":{"post":{"summary":"End an eligibility window (emits MealEligibilityEnded)","tags":["Food Service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endedOn":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"category":{"type":"string","enum":["free","reduced","paid"]},"basis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"applicationId":{"type":"string","format":"uuid","nullable":true},"directCertMatchedOn":{"type":"string","format":"date","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","schoolYearId","category","basis","applicationId","directCertMatchedOn","effectiveFrom","effectiveTo","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/accounts":{"get":{"summary":"List student meal accounts","tags":["Food Service"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["active","closed","frozen"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"belowThreshold","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create or adopt a student meal account","tags":["Food Service"],"description":"Idempotent: if the student already has an account, its settings are updated with any provided fields.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"lowBalanceThresholdCents":{"type":"integer","minimum":0,"default":500},"autoReload":{"type":"boolean","default":false},"autoReloadAmountCents":{"type":"integer","minimum":0,"default":0},"guardianPaysPersonId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":500}},"required":["studentId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/accounts/{id}":{"get":{"summary":"Get a student meal account","tags":["Food Service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update meal-account settings","tags":["Food Service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer","minimum":0},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer","minimum":0},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/accounts/{id}/fund":{"post":{"summary":"Add funds to a meal account (emits MealAccountFunded)","tags":["Food Service"],"description":"Records the payment, bumps the balance, and creates a payment transaction. Does NOT run a real payment — integrate a processor at the route boundary and then call this to finalize.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":1000000},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment"],"default":"online"},"referenceId":{"type":"string","maxLength":50},"notes":{"type":"string","maxLength":500}},"required":["amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/transactions":{"get":{"summary":"List meal transactions (POS ledger)","tags":["Food Service"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"accountId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"in":"query","name":"transactionType","required":false},{"schema":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"in":"query","name":"mealType","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/purchase":{"post":{"summary":"Record a POS meal purchase (emits MealPurchased)","tags":["Food Service"],"description":"Looks up the student's current eligibility, charges the correct amount (free = $0, reduced = capped, paid = list price), debits the account, and marks the transaction reimbursable unless meal type is `a_la_carte`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"listPriceCents":{"type":"integer","minimum":0},"servedOn":{"type":"string","format":"date"},"posTerminalId":{"type":"string","maxLength":50},"notes":{"type":"string","maxLength":500}},"required":["studentId","mealType","listPriceCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/transactions/{id}/refund":{"post":{"summary":"Refund a prior POS purchase (emits MealRefunded)","tags":["Food Service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/service-days":{"get":{"summary":"List daily reimbursement claim rollups","tags":["Food Service"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"string","enum":["open","closed","claimed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"serviceDate":{"type":"string","format":"date"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"freeCount":{"type":"integer"},"reducedCount":{"type":"integer"},"paidCount":{"type":"integer"},"adultCount":{"type":"integer"},"totalReimbursable":{"type":"integer"},"status":{"type":"string","enum":["open","closed","claimed"]},"closedByUserId":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","schoolId","serviceDate","mealType","freeCount","reducedCount","paidCount","adultCount","totalReimbursable","status","closedByUserId","closedAt","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/service-days/close":{"post":{"summary":"Close a day's counts for reimbursement (emits MealServiceDayClosed)","tags":["Food Service"],"description":"Recomputes counts from the ledger, then flips the status to `closed`. Re-runs are safe while status is `open`; once `claimed`, use an audit event to reopen.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"serviceDate":{"type":"string","format":"date"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"notes":{"type":"string","maxLength":500}},"required":["schoolId","serviceDate","mealType"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"serviceDate":{"type":"string","format":"date"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"freeCount":{"type":"integer"},"reducedCount":{"type":"integer"},"paidCount":{"type":"integer"},"adultCount":{"type":"integer"},"totalReimbursable":{"type":"integer"},"status":{"type":"string","enum":["open","closed","claimed"]},"closedByUserId":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","schoolId","serviceDate","mealType","freeCount","reducedCount","paidCount","adultCount","totalReimbursable","status","closedByUserId","closedAt","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/reports/daily-counts":{"get":{"summary":"Daily reimbursable-counts report across a date range","tags":["Food Service"],"description":"The basis for the state claim file. One row per school/date/meal-type. Results include open days so the director can see running totals.","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":true},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"in":"query","name":"mealType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"serviceDate":{"type":"string","format":"date"},"schoolId":{"type":"string","format":"uuid"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"freeCount":{"type":"integer"},"reducedCount":{"type":"integer"},"paidCount":{"type":"integer"},"totalReimbursable":{"type":"integer"},"status":{"type":"string","enum":["open","closed","claimed"]}},"required":["serviceDate","schoolId","mealType","freeCount","reducedCount","paidCount","totalReimbursable","status"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/meal-service":{"get":{"summary":"Guardianed student's meal account + eligibility + recent activity","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"recentTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false}},"pendingApplicationId":{"type":"string","format":"uuid","nullable":true}},"required":["studentPersonId","studentName","account","currentCategory","recentTransactions","pendingApplicationId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/meal-service":{"get":{"summary":"Signed-in student's meal account + recent activity","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"balanceCents":{"type":"integer"},"status":{"type":"string","enum":["active","closed","frozen"]},"lowBalanceThresholdCents":{"type":"integer"},"autoReload":{"type":"boolean"},"autoReloadAmountCents":{"type":"integer"},"guardianPaysPersonId":{"type":"string","format":"uuid","nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"]},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","balanceCents","status","lowBalanceThresholdCents","autoReload","autoReloadAmountCents","guardianPaysPersonId","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"currentCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"recentTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false}},"pendingApplicationId":{"type":"string","format":"uuid","nullable":true}},"required":["studentPersonId","studentName","account","currentCategory","recentTransactions","pendingApplicationId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/meal-service/fund":{"post":{"summary":"Guardian adds funds to a student's meal account (emits MealAccountFunded)","tags":["Parent Portal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":1000000},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment"],"default":"online"},"referenceId":{"type":"string","maxLength":50},"notes":{"type":"string","maxLength":500}},"required":["amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"transactionType":{"type":"string","enum":["purchase","payment","refund","adjustment"]},"amountCents":{"type":"integer"},"servedOn":{"type":"string","format":"date"},"servedAt":{"type":"string","format":"date-time","nullable":true},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"],"nullable":true},"reimbursable":{"type":"boolean"},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"cashierUserId":{"type":"string","nullable":true},"posTerminalId":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["online","cash","check","adjustment","refund"],"nullable":true},"referenceId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","accountId","studentPersonId","schoolId","transactionType","amountCents","servedOn","servedAt","mealType","reimbursable","eligibilityCategory","cashierUserId","posTerminalId","paymentMethod","referenceId","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/meal-service/applications":{"post":{"summary":"Submit a household meal-benefits application","tags":["Parent Portal"],"description":"Applicant must be the signed-in guardian. Each student member must be a student this guardian is linked to.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"householdSize":{"type":"integer","minimum":1,"maximum":30},"householdIncomeCents":{"type":"integer","minimum":0},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"],"default":"income"},"basisCaseNumber":{"type":"string","maxLength":50},"signatureOn":{"type":"string","format":"date"},"members":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"fullName":{"type":"string","minLength":1,"maxLength":200},"relationship":{"type":"string","maxLength":50},"isStudent":{"type":"boolean","default":false},"incomeCents":{"type":"integer","minimum":0,"default":0}},"required":["fullName"],"additionalProperties":false},"minItems":1,"maxItems":30},"notes":{"type":"string","maxLength":2000}},"required":["householdSize","householdIncomeCents","incomeFrequency","members"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicantPersonId":{"type":"string","format":"uuid"},"applicantName":{"type":"string"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"signatureOn":{"type":"string","format":"date","nullable":true},"householdSize":{"type":"integer"},"householdIncomeCents":{"type":"integer"},"incomeFrequency":{"type":"string","enum":["weekly","biweekly","semimonthly","monthly","annual"]},"annualizedIncomeCents":{"type":"integer"},"eligibilityBasis":{"type":"string","enum":["income","application","snap","tanf","foster","homeless","migrant","head_start","direct_cert","cep","extended"]},"basisCaseNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","approved","denied","appealed","withdrawn"]},"eligibilityCategory":{"type":"string","enum":["free","reduced","paid"],"nullable":true},"reviewedByUserId":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"memberCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"fullName":{"type":"string"},"relationship":{"type":"string","nullable":true},"isStudent":{"type":"boolean"},"incomeCents":{"type":"integer"}},"required":["id","applicationId","studentPersonId","fullName","relationship","isStudent","incomeCents"],"additionalProperties":false}}},"required":["id","applicantPersonId","schoolYearId","submittedAt","signatureOn","householdSize","householdIncomeCents","incomeFrequency","annualizedIncomeCents","eligibilityBasis","basisCaseNumber","status","eligibilityCategory","reviewedByUserId","reviewedAt","denyReason","notes","createdAt","updatedAt","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/direct-cert/imports":{"get":{"summary":"List direct-certification CSV imports","tags":["Food Service – Direct Cert"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["preview","applied","discarded"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Upload a state direct-cert CSV (returns a preview; not yet applied)","tags":["Food Service – Direct Cert"],"description":"Parse the CSV, match against the enrolled student roster, and persist a `preview` import. No eligibility records are written until you POST to `/:id/apply`. The CSV text is accepted as a JSON string field to avoid a multipart dependency.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"csvData":{"type":"string","minLength":1,"maxLength":2000000},"schoolYearId":{"type":"string","format":"uuid"}},"required":["filename","csvData"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"importId":{"type":"string","format":"uuid"},"rowNumber":{"type":"integer"},"stateStudentId":{"type":"string","nullable":true},"lastName":{"type":"string"},"firstName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"program":{"type":"string","enum":["snap","tanf","foster","medicaid","homeless","migrant"]},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchConfidence":{"type":"string","enum":["exact","fuzzy","none"]},"matchReason":{"type":"string","nullable":true},"eligibilityId":{"type":"string","format":"uuid","nullable":true},"overriddenByUserId":{"type":"string","format":"uuid","nullable":true},"overrideAction":{"type":"string","enum":["accept","reject"],"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","importId","rowNumber","stateStudentId","lastName","firstName","dateOfBirth","program","matchedStudentId","matchConfidence","matchReason","eligibilityId","overriddenByUserId","overrideAction","createdAt","updatedAt"],"additionalProperties":false}},"parseErrors":{"type":"array","items":{"type":"string"}}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/direct-cert/imports/{id}":{"get":{"summary":"Get a direct-cert import with all per-student result rows","tags":["Food Service – Direct Cert"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"importId":{"type":"string","format":"uuid"},"rowNumber":{"type":"integer"},"stateStudentId":{"type":"string","nullable":true},"lastName":{"type":"string"},"firstName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"program":{"type":"string","enum":["snap","tanf","foster","medicaid","homeless","migrant"]},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchConfidence":{"type":"string","enum":["exact","fuzzy","none"]},"matchReason":{"type":"string","nullable":true},"eligibilityId":{"type":"string","format":"uuid","nullable":true},"overriddenByUserId":{"type":"string","format":"uuid","nullable":true},"overrideAction":{"type":"string","enum":["accept","reject"],"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","importId","rowNumber","stateStudentId","lastName","firstName","dateOfBirth","program","matchedStudentId","matchConfidence","matchReason","eligibilityId","overriddenByUserId","overrideAction","createdAt","updatedAt"],"additionalProperties":false}},"parseErrors":{"type":"array","items":{"type":"string"}}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/direct-cert/imports/{id}/apply":{"post":{"summary":"Apply a preview import — writes eligibility records for all matched students","tags":["Food Service – Direct Cert"],"description":"Stamps a `MealEligibility` row (basis=direct_cert, category=free) for every matched (or manually accepted) result row, then marks the import as `applied`. This action is irreversible — discard first if you want to reject the import.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"effectiveFrom":{"type":"string","format":"date"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"importId":{"type":"string","format":"uuid"},"rowNumber":{"type":"integer"},"stateStudentId":{"type":"string","nullable":true},"lastName":{"type":"string"},"firstName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"program":{"type":"string","enum":["snap","tanf","foster","medicaid","homeless","migrant"]},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchConfidence":{"type":"string","enum":["exact","fuzzy","none"]},"matchReason":{"type":"string","nullable":true},"eligibilityId":{"type":"string","format":"uuid","nullable":true},"overriddenByUserId":{"type":"string","format":"uuid","nullable":true},"overrideAction":{"type":"string","enum":["accept","reject"],"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","importId","rowNumber","stateStudentId","lastName","firstName","dateOfBirth","program","matchedStudentId","matchConfidence","matchReason","eligibilityId","overriddenByUserId","overrideAction","createdAt","updatedAt"],"additionalProperties":false}},"parseErrors":{"type":"array","items":{"type":"string"}}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/direct-cert/imports/{id}/discard":{"post":{"summary":"Discard a preview import (no eligibility records written)","tags":["Food Service – Direct Cert"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"importId":{"type":"string","format":"uuid"},"rowNumber":{"type":"integer"},"stateStudentId":{"type":"string","nullable":true},"lastName":{"type":"string"},"firstName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"program":{"type":"string","enum":["snap","tanf","foster","medicaid","homeless","migrant"]},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchConfidence":{"type":"string","enum":["exact","fuzzy","none"]},"matchReason":{"type":"string","nullable":true},"eligibilityId":{"type":"string","format":"uuid","nullable":true},"overriddenByUserId":{"type":"string","format":"uuid","nullable":true},"overrideAction":{"type":"string","enum":["accept","reject"],"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","importId","rowNumber","stateStudentId","lastName","firstName","dateOfBirth","program","matchedStudentId","matchConfidence","matchReason","eligibilityId","overriddenByUserId","overrideAction","createdAt","updatedAt"],"additionalProperties":false}},"parseErrors":{"type":"array","items":{"type":"string"}}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/direct-cert/imports/{id}/results/{resultId}":{"patch":{"summary":"Manually accept or reject a single match row before applying","tags":["Food Service – Direct Cert"],"description":"Use `action=accept` to link an unmatched row to a specific student. Use `action=reject` to prevent an incorrectly auto-matched row from receiving an eligibility record when the import is applied.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["accept","reject"]},"studentPersonId":{"type":"string","format":"uuid"}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"resultId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"filename":{"type":"string"},"importedByUserId":{"type":"string","format":"uuid"},"rowCount":{"type":"integer"},"matchedCount":{"type":"integer"},"unmatchedCount":{"type":"integer"},"status":{"type":"string","enum":["preview","applied","discarded"]},"appliedAt":{"type":"string","format":"date-time","nullable":true},"appliedByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"importId":{"type":"string","format":"uuid"},"rowNumber":{"type":"integer"},"stateStudentId":{"type":"string","nullable":true},"lastName":{"type":"string"},"firstName":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"program":{"type":"string","enum":["snap","tanf","foster","medicaid","homeless","migrant"]},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchConfidence":{"type":"string","enum":["exact","fuzzy","none"]},"matchReason":{"type":"string","nullable":true},"eligibilityId":{"type":"string","format":"uuid","nullable":true},"overriddenByUserId":{"type":"string","format":"uuid","nullable":true},"overrideAction":{"type":"string","enum":["accept","reject"],"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","importId","rowNumber","stateStudentId","lastName","firstName","dateOfBirth","program","matchedStudentId","matchConfidence","matchReason","eligibilityId","overriddenByUserId","overrideAction","createdAt","updatedAt"],"additionalProperties":false}},"parseErrors":{"type":"array","items":{"type":"string"}}},"required":["id","districtId","schoolYearId","filename","importedByUserId","rowCount","matchedCount","unmatchedCount","status","appliedAt","appliedByUserId","createdAt","updatedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/inbound":{"post":{"summary":"External POS terminal webhook — ingest a transaction for staging","tags":["Food Service – POS Inbound"],"description":"Called by external POS hardware or software on each meal served. The request MUST include an `X-Forge-Signature: sha256=<hex-hmac>` header computed over the raw JSON body using the terminal's shared secret configured in `District.settings.posTerminals[terminalId].secret`. Duplicate payloads (same districtId + terminalId + externalTxnId) are silently accepted and return the existing record — safe for at-least-once delivery.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"terminalId":{"type":"string","minLength":1,"maxLength":100},"externalTxnId":{"type":"string","minLength":1,"maxLength":100},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"studentExternalId":{"type":"string","maxLength":50},"payload":{"type":"object","additionalProperties":{}}},"required":["terminalId","externalTxnId","servedOn","amountCents","mealType","payload"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"terminalId":{"type":"string"},"externalTxnId":{"type":"string"},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchedAccountId":{"type":"string","format":"uuid","nullable":true},"mealTransactionId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"receivedAt":{"type":"string","format":"date-time"},"reconciledAt":{"type":"string","format":"date-time","nullable":true},"reconciledByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","terminalId","externalTxnId","matchedStudentId","matchedAccountId","mealTransactionId","status","servedOn","amountCents","mealType","receivedAt","reconciledAt","reconciledByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"List external POS inbound transactions (staging)","tags":["Food Service – POS Inbound"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"terminalId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"terminalId":{"type":"string"},"externalTxnId":{"type":"string"},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchedAccountId":{"type":"string","format":"uuid","nullable":true},"mealTransactionId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"receivedAt":{"type":"string","format":"date-time"},"reconciledAt":{"type":"string","format":"date-time","nullable":true},"reconciledByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","terminalId","externalTxnId","matchedStudentId","matchedAccountId","mealTransactionId","status","servedOn","amountCents","mealType","receivedAt","reconciledAt","reconciledByUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/inbound/{id}":{"get":{"summary":"Get a single external POS inbound transaction","tags":["Food Service – POS Inbound"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"terminalId":{"type":"string"},"externalTxnId":{"type":"string"},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchedAccountId":{"type":"string","format":"uuid","nullable":true},"mealTransactionId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"receivedAt":{"type":"string","format":"date-time"},"reconciledAt":{"type":"string","format":"date-time","nullable":true},"reconciledByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","terminalId","externalTxnId","matchedStudentId","matchedAccountId","mealTransactionId","status","servedOn","amountCents","mealType","receivedAt","reconciledAt","reconciledByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/inbound/{id}/reconcile":{"post":{"summary":"Reconcile a staged POS transaction → writes a canonical MealTransaction","tags":["Food Service – POS Inbound"],"description":"The director confirms the student was present and received the meal. This writes a `MealTransaction` via the same `recordPurchase` path used by the internal cashier POS (eligibility lookup, free/reduced pricing, reimbursable flag, service-day rollup rebuild all apply).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"terminalId":{"type":"string"},"externalTxnId":{"type":"string"},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchedAccountId":{"type":"string","format":"uuid","nullable":true},"mealTransactionId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"receivedAt":{"type":"string","format":"date-time"},"reconciledAt":{"type":"string","format":"date-time","nullable":true},"reconciledByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","terminalId","externalTxnId","matchedStudentId","matchedAccountId","mealTransactionId","status","servedOn","amountCents","mealType","receivedAt","reconciledAt","reconciledByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/inbound/{id}/ignore":{"post":{"summary":"Mark a staged POS transaction as ignored (no meal transaction created)","tags":["Food Service – POS Inbound"],"description":"Use when a transaction is a duplicate, test ping, or a non-meal event from the external terminal. Ignored rows stay in the audit log but do not affect counts or reimbursable totals.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"terminalId":{"type":"string"},"externalTxnId":{"type":"string"},"matchedStudentId":{"type":"string","format":"uuid","nullable":true},"matchedAccountId":{"type":"string","format":"uuid","nullable":true},"mealTransactionId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["pending","matched","unmatched","reconciled","ignored"]},"servedOn":{"type":"string","format":"date"},"amountCents":{"type":"integer"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","a_la_carte"]},"receivedAt":{"type":"string","format":"date-time"},"reconciledAt":{"type":"string","format":"date-time","nullable":true},"reconciledByUserId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","terminalId","externalTxnId","matchedStudentId","matchedAccountId","mealTransactionId","status","servedOn","amountCents","mealType","receivedAt","reconciledAt","reconciledByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meal-service/pos/inbound/reconciliation":{"get":{"summary":"POS inbound reconciliation summary — counts per terminal over a date range","tags":["Food Service – POS Inbound"],"parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"terminalId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"terminalId":{"type":"string"},"totalPending":{"type":"integer"},"totalMatched":{"type":"integer"},"totalReconciled":{"type":"integer"},"totalIgnored":{"type":"integer"},"totalAmountCents":{"type":"integer"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["from","to"],"additionalProperties":false}},"required":["terminalId","totalPending","totalMatched","totalReconciled","totalIgnored","totalAmountCents","period"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ops-import/file-specs":{"get":{"summary":"Finance and facilities import layouts","tags":["Migration"],"description":"Every accepted file with its columns, the aliases each column answers to, and an example value. `importerReady` says whether the file can be loaded today or only prepared against the published layout.","parameters":[{"schema":{"type":"string","enum":["finance","facilities","transportation"]},"in":"query","name":"domain","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ops-import/file-specs/{fileId}.csv":{"get":{"summary":"Blank template for one import file","tags":["Migration"],"parameters":[{"schema":{"type":"string","maxLength":60},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ops-import/{fileId}/preview":{"post":{"summary":"Parse a file and report what would happen","tags":["Migration"],"description":"Writes nothing. Resolves references and reports every row it could not use.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":20000000}},"required":["csv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":60},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/ops-import/{fileId}/apply":{"post":{"summary":"Import a file","tags":["Migration"],"description":"Matches on the natural key, so re-running the same file updates rather than duplicating. Imported opening figures are replaced rather than added to.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":20000000}},"required":["csv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":60},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/catalog":{"get":{"summary":"List fee catalog entries","tags":["Fees"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer"},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","category","amountCents","isActive","isTaxable","glAccount","schoolYearId","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a fee catalog entry (emits FeeCatalogCreated)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer","minimum":0,"maximum":10000000},"isActive":{"type":"boolean","default":true},"isTaxable":{"type":"boolean","default":false},"glAccount":{"type":"string","maxLength":60},"schoolYearId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":500}},"required":["code","name","category","amountCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer"},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","category","amountCents","isActive","isTaxable","glAccount","schoolYearId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/catalog/{id}":{"get":{"summary":"Get a fee catalog entry","tags":["Fees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer"},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","category","amountCents","isActive","isTaxable","glAccount","schoolYearId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a fee catalog entry (emits FeeCatalogUpdated)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer","minimum":0,"maximum":10000000},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","maxLength":60,"nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer"},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","category","amountCents","isActive","isTaxable","glAccount","schoolYearId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Archive a fee catalog entry (soft delete; emits FeeCatalogArchived)","tags":["Fees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"amountCents":{"type":"integer"},"isActive":{"type":"boolean"},"isTaxable":{"type":"boolean"},"glAccount":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","category","amountCents","isActive","isTaxable","glAccount","schoolYearId","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees":{"get":{"summary":"List student fees","tags":["Fees"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["open","partial","paid","void","waived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["registration","ap_exam","athletics","field_trip","course","academic","activity","technology","fine","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"dueBefore","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Assess a single fee against a student (emits FeeAssessed)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"feeCatalogId":{"type":"string","format":"uuid"},"code":{"type":"string","maxLength":40},"description":{"type":"string","maxLength":300},"amountCents":{"type":"integer","minimum":0,"maximum":10000000},"schoolYearId":{"type":"string","format":"uuid"},"dueOn":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":500}},"required":["studentId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false}}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt","payments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/{id}":{"get":{"summary":"Get a student fee with its payments","tags":["Fees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false}}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt","payments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/bulk-assess":{"post":{"summary":"Assess a catalog fee against many students (emits one FeeAssessed per student)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"feeCatalogId":{"type":"string","format":"uuid"},"studentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500},"dueOn":{"type":"string","format":"date"},"schoolYearId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":500}},"required":["feeCatalogId","studentIds"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/{id}/waive":{"post":{"summary":"Waive a student fee (admin forgiveness; emits FeeWaived)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false}}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt","payments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/{id}/void":{"post":{"summary":"Void a student fee (assessed in error; emits FeeVoided)","tags":["Fees"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false}}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt","payments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/reports/summary":{"get":{"summary":"District-wide fees summary (for business-office dashboard)","tags":["Fees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalAssessedCents":{"type":"integer"},"totalCollectedCents":{"type":"integer"},"totalBalanceCents":{"type":"integer"},"totalWaivedCents":{"type":"integer"},"totalVoidedCents":{"type":"integer"},"openCount":{"type":"integer"},"paidCount":{"type":"integer"},"collectionRate":{"type":"number"}},"required":["totalAssessedCents","totalCollectedCents","totalBalanceCents","totalWaivedCents","totalVoidedCents","openCount","paidCount","collectionRate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/payments":{"get":{"summary":"List fee payments (includes refunds as negative rows)","tags":["Fees"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentFeeId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"in":"query","name":"processor","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/{id}/payments":{"post":{"summary":"Record an in-office payment against a fee (emits FeePaid)","tags":["Fees"],"description":"Use for check, cash, school-cash (external), or manual adjustment payments. Online Stripe payments use the family endpoint which also finalizes the PaymentIntent.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000000},"paymentMethod":{"type":"string","enum":["cash","check","school_cash","adjustment"],"default":"check"},"referenceId":{"type":"string","maxLength":100},"notes":{"type":"string","maxLength":500},"glPost":{"type":"object","properties":{"cashBudgetAccountId":{"type":"string","format":"uuid"},"revenueBudgetAccountId":{"type":"string","format":"uuid"}},"required":["cashBudgetAccountId","revenueBudgetAccountId"],"additionalProperties":false}},"required":["amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid"}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/payments/{id}/refund":{"post":{"summary":"Refund a previous payment (emits FeeRefunded)","tags":["Fees"],"description":"Stored as a negative `FeePayment` that points at the original via `refundedFromId`. Refuses over-refund.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000000},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid"}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/fees":{"get":{"summary":"Guardianed student's fees — balance, open charges, payment history","tags":["Parent Portal"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"totalBalanceCents":{"type":"integer"},"openFeeCount":{"type":"integer"},"overdueFeeCount":{"type":"integer"},"fees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt"],"additionalProperties":false}}},"required":["studentPersonId","studentName","totalBalanceCents","openFeeCount","overdueFeeCount","fees"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/student/me/fees":{"get":{"summary":"Signed-in student's fees (read-only)","tags":["Student Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"totalBalanceCents":{"type":"integer"},"openFeeCount":{"type":"integer"},"overdueFeeCount":{"type":"integer"},"fees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"feeCatalogId":{"type":"string","format":"uuid","nullable":true},"feeCatalogCode":{"type":"string","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"balanceCents":{"type":"integer"},"paidCents":{"type":"integer"},"status":{"type":"string","enum":["open","partial","paid","void","waived"]},"dueOn":{"type":"string","format":"date","nullable":true},"assessedOn":{"type":"string","format":"date"},"assessedByUserId":{"type":"string","nullable":true},"waivedByUserId":{"type":"string","nullable":true},"waivedAt":{"type":"string","format":"date-time","nullable":true},"waivedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","studentPersonId","feeCatalogId","schoolYearId","code","description","amountCents","balanceCents","status","dueOn","assessedOn","assessedByUserId","waivedByUserId","waivedAt","waivedReason","notes","createdAt","updatedAt"],"additionalProperties":false}}},"required":["studentPersonId","studentName","totalBalanceCents","openFeeCount","overdueFeeCount","fees"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/fees/{id}/pay":{"post":{"summary":"Finalize an online (Stripe) payment against a fee (emits FeePaid)","tags":["Parent Portal"],"description":"Called after the front end confirms a Stripe PaymentIntent. We record the payment, finalize status, and bump the ledger. The webhook handler is idempotent against `processorIntentId`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":10000000},"processorIntentId":{"type":"string","minLength":4,"maxLength":100},"processorChargeId":{"type":"string","maxLength":100},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"default":"succeeded"},"notes":{"type":"string","maxLength":500}},"required":["amountCents","processorIntentId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"studentFeeId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["stripe","school_cash","cash","check","adjustment","refund"]},"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"processorIntentId":{"type":"string","nullable":true},"processorChargeId":{"type":"string","nullable":true},"processorStatus":{"type":"string","enum":["succeeded","pending","failed"],"nullable":true},"referenceId":{"type":"string","nullable":true},"refundedFromId":{"type":"string","format":"uuid","nullable":true},"paidByUserId":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","studentFeeId","amountCents","paymentMethod","processor","processorIntentId","processorChargeId","processorStatus","referenceId","refundedFromId","paidByUserId","paidAt","notes","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid"}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/{id}/checkout":{"post":{"summary":"Create a Stripe hosted-checkout session for a fee (parent portal)","tags":["Fees"],"description":"Creates a Stripe Checkout Session for the specified fee. The response contains `sessionUrl` — the parent portal navigates to this URL. Stripe handles the card form. On completion, Stripe calls our webhook which projects the payment into the fee ledger.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"successPath":{"type":"string","minLength":1,"maxLength":500,"default":"/parent"},"cancelPath":{"type":"string","minLength":1,"maxLength":500,"default":"/parent"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sessionUrl":{"type":"string","format":"uri"},"sessionId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"amountCents":{"type":"integer"},"currency":{"type":"string"}},"required":["sessionUrl","sessionId","expiresAt","amountCents","currency"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/fees/payments/reconciliation":{"get":{"summary":"Payment reconciliation — online vs. in-office totals (admin GL export)","tags":["Fees"],"description":"Aggregate payment totals by processor channel for a given date range. Used by the business office to reconcile Stripe settlements against in-office deposits.","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalCollectedCents":{"type":"integer"},"onlineCollectedCents":{"type":"integer"},"inOfficeCollectedCents":{"type":"integer"},"totalRefundedCents":{"type":"integer"},"onlineCount":{"type":"integer"},"inOfficeCount":{"type":"integer"},"refundCount":{"type":"integer"},"byProcessor":{"type":"array","items":{"type":"object","properties":{"processor":{"type":"string","enum":["stripe","manual","school_cash","adjustment"]},"count":{"type":"integer"},"totalCents":{"type":"integer"}},"required":["processor","count","totalCents"],"additionalProperties":false}},"periodFrom":{"type":"string","format":"date","nullable":true},"periodTo":{"type":"string","format":"date","nullable":true}},"required":["totalCollectedCents","onlineCollectedCents","inOfficeCollectedCents","totalRefundedCents","onlineCount","inOfficeCount","refundCount","byProcessor","periodFrom","periodTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/budget/accounts":{"get":{"summary":"List budget accounts","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"description":{"type":"string"},"njCoaCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer"}},"required":["id","accountCode","description","njCoaCode","fiscalYear"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a budget account","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountCode":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","minLength":1,"maxLength":300},"njCoaCode":{"type":"string","maxLength":50},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["accountCode","description","fiscalYear"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"description":{"type":"string"},"njCoaCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer"}},"required":["id","accountCode","description","njCoaCode","fiscalYear"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/budget/entries":{"post":{"summary":"Post a budget journal entry","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"entryType":{"type":"string","enum":["debit","credit","encumbrance","adjustment"]},"amount":{"type":"number"},"memo":{"type":"string","maxLength":500}},"required":["accountId","entryType","amount"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"entryType":{"type":"string"},"amount":{"type":"number"},"memo":{"type":"string","nullable":true},"postedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","entryType","amount","memo","postedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/budget/summary":{"get":{"summary":"Budget summary by account for a fiscal year","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fiscalYear":{"type":"integer"},"totalsByAccount":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"description":{"type":"string"},"debit":{"type":"number"},"credit":{"type":"number"},"encumbrance":{"type":"number"},"balance":{"type":"number"}},"required":["accountId","accountCode","description","debit","credit","encumbrance","balance"],"additionalProperties":false}}},"required":["fiscalYear","totalsByAccount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/budget/status":{"get":{"summary":"Budget status — appropriation, expended, encumbered, available","tags":["Business Office"],"description":"The working view of the budget. Available is appropriation minus expenditures minus open encumbrances, so an approved purchase order reduces it immediately rather than when its invoice arrives.","parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true},{"schema":{"type":"string","format":"date"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fiscalYear":{"type":"number"},"asOf":{"type":"string","nullable":true},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"description":{"type":"string"},"fundCode":{"type":"string","nullable":true},"fundName":{"type":"string","nullable":true},"functionGroup":{"type":"string","nullable":true},"objectGroup":{"type":"string","nullable":true},"adopted":{"type":"number"},"transfers":{"type":"number"},"appropriation":{"type":"number"},"expenditures":{"type":"number"},"encumbrances":{"type":"number"},"available":{"type":"number"},"usedPct":{"type":"number","nullable":true},"overExpended":{"type":"boolean"}},"required":["accountId","accountCode","description","fundCode","fundName","functionGroup","objectGroup","adopted","transfers","appropriation","expenditures","encumbrances","available","usedPct","overExpended"],"additionalProperties":false}},"funds":{"type":"array","items":{"type":"object","properties":{"fundCode":{"type":"string"},"fundName":{"type":"string"},"fundType":{"type":"string"},"adopted":{"type":"number"},"transfers":{"type":"number"},"appropriation":{"type":"number"},"expenditures":{"type":"number"},"encumbrances":{"type":"number"},"available":{"type":"number"},"accountCount":{"type":"number"},"overExpendedAccounts":{"type":"number"}},"required":["fundCode","fundName","fundType","adopted","transfers","appropriation","expenditures","encumbrances","available","accountCount","overExpendedAccounts"],"additionalProperties":false}},"totals":{"type":"object","properties":{"adopted":{"type":"number"},"transfers":{"type":"number"},"appropriation":{"type":"number"},"expenditures":{"type":"number"},"encumbrances":{"type":"number"},"available":{"type":"number"},"overExpendedAccounts":{"type":"number"}},"required":["adopted","transfers","appropriation","expenditures","encumbrances","available","overExpendedAccounts"],"additionalProperties":false}},"required":["fiscalYear","asOf","accounts","funds","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/funds":{"get":{"summary":"NJ fund codes and names","tags":["Business Office"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string"},"type":{"type":"string"}},"required":["code","name","shortName","type"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/business/transfers":{"get":{"summary":"Budget transfers for a fiscal year","tags":["Business Office"],"description":"Includes the cumulative position against the 10% of budget that triggers Executive County Superintendent approval.","parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Raise a budget transfer","tags":["Business Office"],"description":"Refuses if the source line cannot fund it. Flags board approval when the amount exceeds 10% of the receiving line, per N.J.A.C. 6A:23A-13.3.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fromAccountId":{"type":"string","format":"uuid"},"toAccountId":{"type":"string","format":"uuid"},"amount":{"type":"number","exclusiveMinimum":true,"minimum":0},"reason":{"type":"string","minLength":1,"maxLength":4000},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["fromAccountId","toAccountId","amount","reason","fiscalYear"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/transfers/{id}/approve":{"post":{"summary":"Approve and post a budget transfer","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"boardMeetingDate":{"type":"string","format":"date"},"boardResolution":{"type":"string","maxLength":100}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/transfers/{id}/reject":{"post":{"summary":"Reject a budget transfer","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-accounts":{"get":{"summary":"Bank accounts with their current book balance","tags":["Business Office"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a bank account","tags":["Business Office"],"description":"Only the last four digits are stored.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"bankName":{"type":"string","minLength":1,"maxLength":200},"accountNumberLast4":{"type":"string","minLength":4,"maxLength":4,"pattern":"^\\d{4}$"},"fundCode":{"type":"string","maxLength":4,"default":"11"},"glAccountId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true}},"required":["name","bankName","accountNumberLast4"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-accounts/{id}":{"patch":{"summary":"Update a bank account","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"glAccountId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-accounts/{id}/statements":{"get":{"summary":"Statements for a bank account","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-statements":{"post":{"summary":"Record a bank statement to reconcile","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bankAccountId":{"type":"string","format":"uuid"},"statementDate":{"type":"string","format":"date"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"openingBalance":{"type":"number"},"closingBalance":{"type":"number"}},"required":["bankAccountId","statementDate","fiscalYear","openingBalance","closingBalance"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-statements/{id}/reconciliation":{"get":{"summary":"Reconciliation for a statement","tags":["Business Office"],"description":"Bank closing plus deposits in transit less outstanding cheques against book balance plus interest less fees. Balanced only when the two agree to the cent.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-statements/{id}/items":{"post":{"summary":"Add a reconciling item","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemType":{"type":"string","enum":["outstanding_check","deposit_in_transit","bank_fee","interest","bank_error","book_error"]},"description":{"type":"string","minLength":1,"maxLength":500},"amount":{"type":"number","exclusiveMinimum":true,"minimum":0},"referenceNumber":{"type":"string","maxLength":50,"nullable":true},"itemDate":{"type":"string","format":"date","nullable":true}},"required":["itemType","description","amount"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/reconciliation-items/{id}":{"delete":{"summary":"Remove a reconciling item","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-statements/{id}/complete":{"post":{"summary":"Complete a reconciliation","tags":["Business Office"],"description":"Refuses unless both adjusted balances agree exactly.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/bank-statements/{id}/reopen":{"post":{"summary":"Reopen a reconciled statement","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/activity-accounts":{"get":{"summary":"Student activity accounts with balances","tags":["Business Office"],"description":"Fiduciary money held for students, carried in fund 95 and audited annually. These accounts have no appropriation behind them, so they cannot be overdrawn.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open an activity account","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"code":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"accountType":{"type":"string","enum":["club","class","athletic","music","service","other"],"default":"club"},"advisorPersonId":{"type":"string","format":"uuid","nullable":true},"openingBalance":{"type":"number","minimum":0,"default":0}},"required":["schoolId","code","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/activity-accounts/{id}":{"get":{"summary":"One activity account with its running balance","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/activity-accounts/{id}/transactions":{"post":{"summary":"Record a receipt or disbursement","tags":["Business Office"],"description":"A disbursement that would overdraw the account is refused.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"txnType":{"type":"string","enum":["receipt","disbursement"]},"amount":{"type":"number","exclusiveMinimum":true,"minimum":0},"description":{"type":"string","minLength":1,"maxLength":500},"referenceNumber":{"type":"string","maxLength":50,"nullable":true},"txnDate":{"type":"string","format":"date"}},"required":["txnType","amount","description","txnDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/activity-transactions/{id}/approve":{"post":{"summary":"Countersign a disbursement","tags":["Business Office"],"description":"Refused when the approver is the person who recorded it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/activity-transactions/{id}/void":{"post":{"summary":"Void a transaction","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/reports/board-secretary":{"get":{"summary":"Board Secretary monthly certified report (A-148)","tags":["Business Office"],"description":"Appropriations by fund and function as of a month end, with the over-expenditure certification required by N.J.A.C. 6A:23A-16.10.","parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"query","name":"month","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/reports/treasurer":{"get":{"summary":"Treasurer monthly report (A-149)","tags":["Business Office"],"description":"Cash by fund — opening balance, receipts, disbursements, closing balance.","parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"query","name":"month","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions":{"get":{"summary":"List requisitions","tags":["Business Office"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Raise a requisition","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"schoolId":{"type":"string","format":"uuid","nullable":true},"justification":{"type":"string","maxLength":4000,"nullable":true},"neededBy":{"type":"string","format":"date","nullable":true},"vendorSuggestion":{"type":"string","maxLength":200,"nullable":true},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"budgetAccountId":{"type":"string","format":"uuid","nullable":true}},"required":["description","quantity","unitCostCents"],"additionalProperties":false},"default":[]}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions/{id}":{"get":{"summary":"One requisition","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions/{id}/budget-check":{"get":{"summary":"Check a requisition against available budget","tags":["Business Office"],"description":"Groups lines by account before comparing, so two lines on one account are checked against that account together rather than each passing on its own.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions/{id}/submit":{"post":{"summary":"Submit a requisition for approval","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions/{id}/approve":{"post":{"summary":"Approve a requisition and convert it to a purchase order","tags":["Business Office"],"description":"Re-checks the budget at approval rather than trusting the snapshot taken at submission. Refuses on a shortfall unless overrideBudget is set, and records the override when it is.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":1000},"overrideBudget":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/requisitions/{id}/reject":{"post":{"summary":"Reject a requisition","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/business/grants":{"get":{"summary":"Grants with spend against award and period of availability","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a grant award","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":300},"funder":{"type":"string","minLength":1,"maxLength":200},"alnCode":{"type":"string","maxLength":20,"nullable":true},"source":{"type":"string","enum":["federal","state","local","private"],"default":"federal"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"fundCode":{"type":"string","maxLength":4,"default":"20"},"awardAmountCents":{"type":"integer","minimum":0},"carryoverCents":{"type":"integer","minimum":0,"default":0},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"awardNumber":{"type":"string","maxLength":100,"nullable":true},"notes":{"type":"string","maxLength":4000,"nullable":true},"budgetAccountIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]}},"required":["code","title","funder","fiscalYear","awardAmountCents","periodStart","periodEnd"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles":{"get":{"summary":"List payroll cycles","tags":["Business Office"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["draft","processing","closed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"payDate":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["id","periodStart","periodEnd","payDate","status"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a draft payroll cycle","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"payDate":{"type":"string","format":"date"}},"required":["periodStart","periodEnd","payDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"payDate":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["id","periodStart","periodEnd","payDate","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/entries":{"get":{"summary":"List entries for a payroll cycle","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cycleId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"grossPay":{"type":"number"},"netPay":{"type":"number"},"tpafContribution":{"type":"number"},"persContribution":{"type":"number"},"deductions":{"type":"object","additionalProperties":{"type":"number"}}},"required":["id","cycleId","staffPersonId","grossPay","netPay","tpafContribution","persContribution","deductions"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add/update a payroll entry (auto-computes TPAF/PERS + net)","tags":["Business Office"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"},"grossPay":{"type":"number","minimum":0,"maximum":1000000},"program":{"type":"string","enum":["TPAF","PERS","NONE"]},"planCode":{"type":"string","minLength":1,"maxLength":40},"employmentCategory":{"type":"string","enum":["certificated","classified","none"]},"hireDate":{"type":"string","format":"date"},"tierCode":{"type":"string","minLength":1,"maxLength":40},"ytdPayPrior":{"type":"number","minimum":0,"maximum":10000000},"deductions":{"type":"object","additionalProperties":{"type":"number","minimum":0},"default":{}}},"required":["staffPersonId","grossPay"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cycleId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"grossPay":{"type":"number"},"netPay":{"type":"number"},"tpafContribution":{"type":"number"},"persContribution":{"type":"number"},"deductions":{"type":"object","additionalProperties":{"type":"number"}}},"required":["id","cycleId","staffPersonId","grossPay","netPay","tpafContribution","persContribution","deductions"],"additionalProperties":false},"resolvedPlanCode":{"type":"string","nullable":true},"tierCode":{"type":"string","nullable":true},"employeeRate":{"type":"number"},"employerContribution":{"type":"number","nullable":true},"employerRate":{"type":"number","nullable":true},"usedFallback":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["no-plan-resolved","state-config-legacy","plan-missing-rates"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["entry","resolvedPlanCode","tierCode","employeeRate","employerContribution","employerRate","usedFallback","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/generate":{"post":{"summary":"Generate entries for every member of staff","tags":["Business Office"],"description":"Turns the staff roster into one entry per employee, taking each salary from the position they hold and the pension plan from whether that position is certificated or classified. Regenerating replaces the existing entries.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"frequency":{"type":"string","enum":["semimonthly","biweekly","monthly"],"default":"semimonthly"},"replaceExisting":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/summary":{"get":{"summary":"Cycle totals — gross, withheld, net, pension","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/clearance":{"get":{"summary":"Final-pay clearance flags for this cycle (never holds pay)","tags":["Business Office"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/register":{"get":{"summary":"Payroll register — one line per employee","tags":["Business Office"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/frequencies":{"get":{"summary":"Pay frequencies a cycle can be generated at","tags":["Business Office"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/actions/close":{"post":{"summary":"Close a payroll cycle (emits PayrollCycleClosed)","tags":["Business Office"],"description":"Marks the cycle final; no further entries can be added. Totals are computed at close time and stamped on the event.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cycle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"payDate":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["id","periodStart","periodEnd","payDate","status"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"},"grossTotal":{"type":"number"},"netTotal":{"type":"number"}},"required":["cycle","eventId","grossTotal","netTotal"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/payslips.pdf":{"get":{"summary":"Payslips for a cycle as a PDF, one page per employee","tags":["Payroll"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"personIds","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/hr/payroll/filings/941":{"get":{"summary":"Federal 941 for a quarter, built from what was paid","tags":["Payroll"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true},{"schema":{"type":"integer","minimum":1,"maximum":4},"in":"query","name":"quarter","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/filings/nj927":{"get":{"summary":"NJ-927 for a quarter","tags":["Payroll"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true},{"schema":{"type":"integer","minimum":1,"maximum":4},"in":"query","name":"quarter","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/filings/wr30":{"get":{"summary":"WR-30 wage report for a quarter, one line per employee","tags":["Payroll"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true},{"schema":{"type":"integer","minimum":1,"maximum":4},"in":"query","name":"quarter","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/filings/w2":{"get":{"summary":"W-2 figures for every employee paid in a year","tags":["Payroll"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/filings/reconcile":{"get":{"summary":"Do the four quarterly returns add up to the W-2s?","tags":["Payroll"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"year","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/gl-mappings":{"get":{"summary":"Which ledger account each part of a payroll posts to","tags":["Payroll"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"required":{"type":"array","items":{"type":"string"}},"missing":{"type":"array","items":{"type":"string"}}},"required":["required","missing"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/filings/pension":{"get":{"summary":"Report of Contributions for TPAF and PERS over a date range","tags":["Payroll"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":true},{"schema":{"type":"string","enum":["TPAF","PERS"]},"in":"query","name":"plan","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/pension-gaps":{"get":{"summary":"People having pension withheld that the state could not credit","tags":["Payroll"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/ach":{"post":{"summary":"Build the NACHA direct-deposit file for an approved cycle","tags":["Payroll"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileIdModifier":{"type":"string","minLength":1,"maxLength":1,"pattern":"[A-Z0-9]"},"preview":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/cycles/{id}/actions/post":{"post":{"summary":"Post an approved cycle to the general ledger","tags":["Payroll"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/hr/payroll/bank-accounts":{"get":{"summary":"Bank accounts on file, with account numbers masked","tags":["Payroll"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string","nullable":true},"routingNumber":{"type":"string"},"bankName":{"type":"string","nullable":true},"accountLast4":{"type":"string"},"accountType":{"type":"string"},"prenoteSentOn":{"type":"string","nullable":true},"prenoteConfirmedOn":{"type":"string","nullable":true},"active":{"type":"boolean"},"blocked":{"type":"boolean"},"blockedLabel":{"type":"string","nullable":true},"blockedReason":{"type":"string","nullable":true}},"required":["id","personId","name","localId","routingNumber","bankName","accountLast4","accountType","prenoteSentOn","prenoteConfirmedOn","active","blocked","blockedLabel","blockedReason"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Put a bank account on file. The number is sealed and never returned.","tags":["Payroll"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","minLength":1},"routingNumber":{"type":"string","pattern":"^\\d{9}$"},"accountNumber":{"type":"string","minLength":4,"maxLength":17,"pattern":"^\\d+$"},"accountType":{"type":"string","enum":["checking","savings"],"default":"checking"},"bankName":{"type":"string","maxLength":120},"prenoteSent":{"type":"boolean","default":false},"note":{"type":"string","maxLength":300}},"required":["personId","routingNumber","accountNumber"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string","nullable":true},"routingNumber":{"type":"string"},"bankName":{"type":"string","nullable":true},"accountLast4":{"type":"string"},"accountType":{"type":"string"},"prenoteSentOn":{"type":"string","nullable":true},"prenoteConfirmedOn":{"type":"string","nullable":true},"active":{"type":"boolean"},"blocked":{"type":"boolean"},"blockedLabel":{"type":"string","nullable":true},"blockedReason":{"type":"string","nullable":true}},"required":["id","personId","name","localId","routingNumber","bankName","accountLast4","accountType","prenoteSentOn","prenoteConfirmedOn","active","blocked","blockedLabel","blockedReason"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/bank-accounts/{id}":{"patch":{"summary":"Confirm a prenote, or take an account out of use","tags":["Payroll"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prenoteConfirmed":{"type":"boolean"},"active":{"type":"boolean"},"bankName":{"type":"string","maxLength":120},"note":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"boolean","enum":[true]}},"required":["updated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/hr/payroll/ach-settings":{"get":{"summary":"The district's ACH identity. The offset account number is never returned.","tags":["Payroll"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}},"put":{"summary":"Set the district's ACH identity","tags":["Payroll"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"companyName":{"type":"string","minLength":2,"maxLength":120},"companyId":{"type":"string","minLength":1,"maxLength":10},"destinationRouting":{"type":"string","pattern":"^\\d{9}$"},"destinationName":{"type":"string","minLength":2,"maxLength":60},"originRouting":{"type":"string","pattern":"^\\d{9}$"},"entryDescription":{"type":"string","minLength":1,"maxLength":10,"default":"PAYROLL"},"offsetRouting":{"type":"string","pattern":"^\\d{9}$","nullable":true},"offsetAccountNumber":{"type":"string","maxLength":17,"pattern":"^\\d*$","nullable":true},"offsetAccountType":{"type":"string","enum":["checking","savings"],"nullable":true}},"required":["companyName","companyId","destinationRouting","destinationName","originRouting"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"saved":{"type":"boolean","enum":[true]}},"required":["saved"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/vendors":{"get":{"summary":"List vendors with open PO counts and unpaid invoice totals (tax id masked)","tags":["Vendors"],"parameters":[{"schema":{"type":"string","enum":["active","inactive"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"contactName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"w9OnFile":{"type":"boolean"},"status":{"type":"string"},"notes":{"type":"string","nullable":true},"openPoCount":{"type":"integer"},"unpaidInvoiceTotalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","code","contactName","email","phone","addressLine1","city","state","zipCode","taxId","w9OnFile","status","notes","openPoCount","unpaidInvoiceTotalCents","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a vendor to the vendor master (emits VendorCreated)","tags":["Vendors"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":2,"maxLength":30,"pattern":"^[A-Z0-9-]+$"},"contactName":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","maxLength":320},"phone":{"type":"string","maxLength":30},"addressLine1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","maxLength":10},"taxId":{"type":"string","maxLength":30},"w9OnFile":{"type":"boolean","default":false},"notes":{"type":"string","maxLength":10000}},"required":["name","code"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"contactName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"w9OnFile":{"type":"boolean"},"status":{"type":"string"},"notes":{"type":"string","nullable":true},"openPoCount":{"type":"integer"},"unpaidInvoiceTotalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","code","contactName","email","phone","addressLine1","city","state","zipCode","taxId","w9OnFile","status","notes","openPoCount","unpaidInvoiceTotalCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendors/{id}":{"get":{"summary":"Vendor detail with recent invoices and purchase orders","tags":["Vendors"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"contactName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"w9OnFile":{"type":"boolean"},"status":{"type":"string"},"notes":{"type":"string","nullable":true},"openPoCount":{"type":"integer"},"unpaidInvoiceTotalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"recentInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceNumber","invoiceDate","dueDate","amountCents","status","createdAt"],"additionalProperties":false}},"purchaseOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"poNumber":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"totalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","poNumber","title","status","totalCents","createdAt"],"additionalProperties":false}}},"required":["id","districtId","name","code","contactName","email","phone","addressLine1","city","state","zipCode","taxId","w9OnFile","status","notes","openPoCount","unpaidInvoiceTotalCents","createdAt","updatedAt","recentInvoices","purchaseOrders"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit vendor details (emits VendorUpdated)","tags":["Vendors"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":2,"maxLength":30,"pattern":"^[A-Z0-9-]+$"},"contactName":{"type":"string","maxLength":200,"nullable":true},"email":{"type":"string","format":"email","maxLength":320,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":100,"nullable":true},"state":{"type":"string","minLength":2,"maxLength":2,"nullable":true},"zipCode":{"type":"string","maxLength":10,"nullable":true},"taxId":{"type":"string","maxLength":30,"nullable":true},"w9OnFile":{"type":"boolean"},"notes":{"type":"string","maxLength":10000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"contactName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"w9OnFile":{"type":"boolean"},"status":{"type":"string"},"notes":{"type":"string","nullable":true},"openPoCount":{"type":"integer"},"unpaidInvoiceTotalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","code","contactName","email","phone","addressLine1","city","state","zipCode","taxId","w9OnFile","status","notes","openPoCount","unpaidInvoiceTotalCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendors/{id}/archive":{"post":{"summary":"Archive a vendor — refused while unpaid invoices exist (emits VendorArchived)","tags":["Vendors"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"contactName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"w9OnFile":{"type":"boolean"},"status":{"type":"string"},"notes":{"type":"string","nullable":true},"openPoCount":{"type":"integer"},"unpaidInvoiceTotalCents":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","code","contactName","email","phone","addressLine1","city","state","zipCode","taxId","w9OnFile","status","notes","openPoCount","unpaidInvoiceTotalCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices":{"get":{"summary":"List vendor invoices (accounts payable)","tags":["Accounts Payable"],"parameters":[{"schema":{"type":"string","enum":["pending","approved","paid","void"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"vendorId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"dueBefore","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"dueAfter","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a vendor invoice (emits VendorInvoiceRecorded)","tags":["Accounts Payable"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"invoiceNumber":{"type":"string","minLength":1,"maxLength":60},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"amountCents":{"type":"integer","minimum":1},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false},"maxItems":200},"accountCode":{"type":"string","maxLength":80},"memo":{"type":"string","maxLength":1000},"purchaseOrderId":{"type":"string","format":"uuid"}},"required":["vendorId","invoiceNumber","invoiceDate","amountCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices/summary":{"get":{"summary":"AP aging buckets and totals by status","tags":["Accounts Payable"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"aging":{"type":"object","properties":{"currentCents":{"type":"integer"},"days1to30Cents":{"type":"integer"},"days31to60Cents":{"type":"integer"},"days61PlusCents":{"type":"integer"}},"required":["currentCents","days1to30Cents","days31to60Cents","days61PlusCents"],"additionalProperties":false},"byStatus":{"type":"object","additionalProperties":{"type":"object","properties":{"count":{"type":"integer"},"amountCents":{"type":"integer"}},"required":["count","amountCents"],"additionalProperties":false}}},"required":["aging","byStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices/{id}":{"get":{"summary":"Invoice detail including the linked PO summary (when set)","tags":["Accounts Payable"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"purchaseOrder":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"poNumber":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"totalCents":{"type":"integer"}},"required":["id","poNumber","title","status","totalCents"],"additionalProperties":false,"nullable":true}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt","purchaseOrder"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices/{id}/approve":{"post":{"summary":"Approve a pending invoice — recorder cannot self-approve (emits VendorInvoiceApproved)","tags":["Accounts Payable"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices/{id}/pay":{"post":{"summary":"Mark an approved invoice paid; optionally post a balanced GL entry — debit expense, credit cash (emits VendorInvoicePaid)","tags":["Accounts Payable"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paymentMethod":{"type":"string","enum":["check","ach","card","other"]},"paymentRef":{"type":"string","maxLength":100},"glPost":{"type":"object","properties":{"cashBudgetAccountId":{"type":"string","format":"uuid"},"expenseBudgetAccountId":{"type":"string","format":"uuid"}},"required":["cashBudgetAccountId","expenseBudgetAccountId"],"additionalProperties":false}},"required":["paymentMethod"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/vendor-invoices/{id}/void":{"post":{"summary":"Void an unpaid invoice with a reason (emits VendorInvoiceVoided)","tags":["Accounts Payable"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"voidReason":{"type":"string","minLength":1,"maxLength":500}},"required":["voidReason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorCode":{"type":"string"},"purchaseOrderId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"dueDate":{"type":"string","nullable":true},"amountCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"totalCents":{"type":"integer","minimum":0}},"required":["description","quantity","unitCostCents","totalCents"],"additionalProperties":false}},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"paymentMethod":{"type":"string","nullable":true},"paymentRef":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","vendorId","vendorName","vendorCode","purchaseOrderId","invoiceNumber","invoiceDate","dueDate","amountCents","lines","accountCode","memo","status","approvedByUserId","approvedAt","paidAt","paymentMethod","paymentRef","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/journal-entries":{"get":{"summary":"List journal entries with status/fiscal-year/source/account/date filters","tags":["General Ledger"],"parameters":[{"schema":{"type":"string","enum":["draft","posted","void"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","enum":["manual","ap_payment","fee_payment","adjustment","cash_ledger"]},"in":"query","name":"source","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"budgetAccountId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"dateFrom","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"dateTo","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a balanced draft journal entry (emits JournalEntryCreated)","tags":["General Ledger"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entryDate":{"type":"string","format":"date"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"memo":{"type":"string","maxLength":1000},"lines":{"type":"array","items":{"type":"object","properties":{"budgetAccountId":{"type":"string","format":"uuid"},"description":{"type":"string","maxLength":500},"debitCents":{"type":"integer","minimum":0},"creditCents":{"type":"integer","minimum":0}},"required":["budgetAccountId"],"additionalProperties":false},"minItems":2,"maxItems":200}},"required":["entryDate","fiscalYear","lines"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"accountDescription":{"type":"string"},"sortOrder":{"type":"integer"},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"}},"required":["id","budgetAccountId","accountCode","accountDescription","sortOrder","description","debitCents","creditCents"],"additionalProperties":false}}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt","lines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/trial-balance":{"get":{"summary":"Trial balance from POSTED entries — per-account debits/credits/balance with grand totals","tags":["General Ledger"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fiscalYear":{"type":"integer"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"description":{"type":"string"},"njCoaCode":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"},"balanceCents":{"type":"integer"},"outOfYear":{"type":"boolean"},"accountFiscalYear":{"type":"integer"}},"required":["accountId","accountCode","description","njCoaCode","debitCents","creditCents","balanceCents","outOfYear","accountFiscalYear"],"additionalProperties":false}},"totals":{"type":"object","properties":{"debitCents":{"type":"integer"},"creditCents":{"type":"integer"},"balanced":{"type":"boolean"}},"required":["debitCents","creditCents","balanced"],"additionalProperties":false},"unplaced":{"type":"object","properties":{"debitCents":{"type":"integer"},"creditCents":{"type":"integer"},"lineCount":{"type":"integer"}},"required":["debitCents","creditCents","lineCount"],"additionalProperties":false}},"required":["fiscalYear","accounts","totals","unplaced"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/accounts/{id}/activity":{"get":{"summary":"Posted lines for one account, chronological, with a running balance","tags":["General Ledger"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"description":{"type":"string"},"fiscalYear":{"type":"integer"}},"required":["id","accountCode","description","fiscalYear"],"additionalProperties":false},"fiscalYear":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"journalEntryId":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"entryDate":{"type":"string"},"entryMemo":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"},"runningBalanceCents":{"type":"integer"}},"required":["journalEntryId","entryNumber","entryDate","entryMemo","description","debitCents","creditCents","runningBalanceCents"],"additionalProperties":false}},"endingBalanceCents":{"type":"integer"}},"required":["account","fiscalYear","lines","endingBalanceCents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/journal-entries/{id}":{"get":{"summary":"Journal entry detail including lines with account codes","tags":["General Ledger"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"accountDescription":{"type":"string"},"sortOrder":{"type":"integer"},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"}},"required":["id","budgetAccountId","accountCode","accountDescription","sortOrder","description","debitCents","creditCents"],"additionalProperties":false}}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt","lines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a DRAFT journal entry — lines are rewritten with the same balance validation (emits JournalEntryUpdated)","tags":["General Ledger"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entryDate":{"type":"string","format":"date"},"memo":{"type":"string","maxLength":1000,"nullable":true},"lines":{"type":"array","items":{"type":"object","properties":{"budgetAccountId":{"type":"string","format":"uuid"},"description":{"type":"string","maxLength":500},"debitCents":{"type":"integer","minimum":0},"creditCents":{"type":"integer","minimum":0}},"required":["budgetAccountId"],"additionalProperties":false},"minItems":2,"maxItems":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"accountDescription":{"type":"string"},"sortOrder":{"type":"integer"},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"}},"required":["id","budgetAccountId","accountCode","accountDescription","sortOrder","description","debitCents","creditCents"],"additionalProperties":false}}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt","lines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/journal-entries/{id}/post":{"post":{"summary":"Post a draft entry — bridges lines into the budget ledger (emits JournalEntryPosted)","tags":["General Ledger"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"accountDescription":{"type":"string"},"sortOrder":{"type":"integer"},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"}},"required":["id","budgetAccountId","accountCode","accountDescription","sortOrder","description","debitCents","creditCents"],"additionalProperties":false}}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt","lines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/gl/journal-entries/{id}/void":{"post":{"summary":"Void a POSTED entry with a reason — creates reversing budget entries (emits JournalEntryVoided)","tags":["General Ledger"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"voidReason":{"type":"string","minLength":1,"maxLength":500}},"required":["voidReason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entryNumber":{"type":"string"},"fiscalYear":{"type":"integer"},"entryDate":{"type":"string"},"memo":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"sourceRefId":{"type":"string","nullable":true},"totalDebitCents":{"type":"integer"},"totalCreditCents":{"type":"integer"},"lineCount":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","nullable":true},"postedByUserId":{"type":"string","nullable":true},"voidedAt":{"type":"string","format":"date-time","nullable":true},"voidedByUserId":{"type":"string","nullable":true},"voidReason":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"accountCode":{"type":"string"},"accountDescription":{"type":"string"},"sortOrder":{"type":"integer"},"description":{"type":"string","nullable":true},"debitCents":{"type":"integer"},"creditCents":{"type":"integer"}},"required":["id","budgetAccountId","accountCode","accountDescription","sortOrder","description","debitCents","creditCents"],"additionalProperties":false}}},"required":["id","entryNumber","fiscalYear","entryDate","memo","status","source","sourceRefId","totalDebitCents","totalCreditCents","lineCount","postedAt","postedByUserId","voidedAt","voidedByUserId","voidReason","createdByUserId","createdAt","updatedAt","lines"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/identify":{"post":{"summary":"Who is calling from this number, or nobody.","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string"},"target":{"type":"string"},"fromNumber":{"type":"string"},"toNumber":{"type":"string"}},"required":["tenant","fromNumber"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/voice/abilities":{"post":{"summary":"What this caller may ask for, and what the keypad offers.","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string"},"target":{"type":"string"},"identityRef":{"type":"string"}},"required":["tenant","identityRef"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/voice/invoke":{"post":{"summary":"Do it, and say whether it actually worked.","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string"},"target":{"type":"string"},"identityRef":{"type":"string"},"ability":{"type":"string"},"args":{"type":"object","additionalProperties":{},"default":{}}},"required":["tenant","identityRef","ability"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/voice/line":{"get":{"summary":"The number the public rings, and whether the gateway is answering","tags":["Voice"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lineNumber":{"type":"string","nullable":true},"gatewayLabel":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"lastSeenAt":{"type":"string","nullable":true}},"required":["lineNumber","gatewayLabel","enabled","lastSeenAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Set the number by hand, when the gateway has not reported one yet","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lineNumber":{"type":"string","minLength":7,"maxLength":20}},"required":["lineNumber"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lineNumber":{"type":"string"}},"required":["lineNumber"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/access":{"get":{"summary":"Everyone registered to call this district, and whether their line is live","tags":["Voice"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"personId":{"type":"string","nullable":true},"name":{"type":"string"},"email":{"type":"string"},"phoneE164":{"type":"string"},"codeSet":{"type":"boolean"},"enrolled":{"type":"boolean"},"pinIssued":{"type":"boolean"},"confirmedAt":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean"},"lastCallAt":{"type":"string","format":"date-time","nullable":true},"live":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","personId","name","email","phoneE164","codeSet","enrolled","pinIssued","confirmedAt","enabled","lastCallAt","live","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Register a phone number to a login","tags":["Voice"],"description":"Creates the row and issues a one-time enrolment PIN, returned here and never again. Give it to the person; their first call spends it to choose their own code.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"phone":{"type":"string","minLength":7,"maxLength":32}},"required":["userId","phone"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"personId":{"type":"string","nullable":true},"name":{"type":"string"},"email":{"type":"string"},"phoneE164":{"type":"string"},"codeSet":{"type":"boolean"},"enrolled":{"type":"boolean"},"pinIssued":{"type":"boolean"},"confirmedAt":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean"},"lastCallAt":{"type":"string","format":"date-time","nullable":true},"live":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"enrolPin":{"type":"string"}},"required":["id","userId","personId","name","email","phoneE164","codeSet","enrolled","pinIssued","confirmedAt","enabled","lastCallAt","live","createdAt","enrolPin"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/candidates":{"get":{"summary":"District logins that could be given a phone line","tags":["Voice"],"parameters":[{"schema":{"type":"string","maxLength":120},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"personId":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"phoneOnFile":{"type":"string","nullable":true},"name":{"type":"string"},"email":{"type":"string"},"alreadyRegistered":{"type":"boolean"}},"required":["userId","personId","roles","phoneOnFile","name","email","alreadyRegistered"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/access/{id}":{"patch":{"summary":"Change a registered number, or switch a line off","tags":["Voice"],"description":"Changing the number clears the code with it: the code was set against the old handset, and carrying it over would let a re-pointed number keep an unbroken line.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":7,"maxLength":32},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"codeCleared":{"type":"boolean"}},"required":["id","codeCleared"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Take a phone number off the line entirely","tags":["Voice"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/ability-catalog":{"get":{"summary":"Everything the phone line can be asked to do","tags":["Voice"],"description":"The fixed allowlist from abilities.ts, with the permission each one sits behind. A department extension may narrow this list; nothing can widen it.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"}},"required":["key","description"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/extensions":{"get":{"summary":"The keypad menu for this district","tags":["Voice"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"digits":{"type":"string"},"kind":{"type":"string","enum":["department","person"]},"name":{"type":"string"},"abilities":{"type":"array","items":{"type":"string"},"nullable":true},"personId":{"type":"string","nullable":true},"phoneE164":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"sortOrder":{"type":"integer"}},"required":["id","digits","kind","name","abilities","personId","phoneE164","enabled","sortOrder"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an extension to the keypad menu","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"digits":{"type":"string","pattern":"^[1-9]\\d{0,3}$"},"kind":{"type":"string","enum":["department","person"]},"name":{"type":"string","minLength":1,"maxLength":120},"abilities":{"type":"array","items":{"type":"string"},"maxItems":50,"nullable":true},"userId":{"type":"string","nullable":true},"phone":{"type":"string","maxLength":32,"nullable":true},"enabled":{"type":"boolean","default":true},"sortOrder":{"type":"integer","minimum":0,"maximum":999,"default":0}},"required":["digits","kind","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"digits":{"type":"string"},"kind":{"type":"string","enum":["department","person"]},"name":{"type":"string"},"abilities":{"type":"array","items":{"type":"string"},"nullable":true},"personId":{"type":"string","nullable":true},"phoneE164":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"sortOrder":{"type":"integer"}},"required":["id","digits","kind","name","abilities","personId","phoneE164","enabled","sortOrder"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/extensions/{id}":{"patch":{"summary":"Edit an extension","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"digits":{"type":"string","pattern":"^[1-9]\\d{0,3}$"},"kind":{"type":"string","enum":["department","person"]},"name":{"type":"string","minLength":1,"maxLength":120},"abilities":{"type":"array","items":{"type":"string"},"maxItems":50,"nullable":true},"userId":{"type":"string","nullable":true},"phone":{"type":"string","maxLength":32,"nullable":true},"enabled":{"type":"boolean","default":true},"sortOrder":{"type":"integer","minimum":0,"maximum":999,"default":0}},"required":["digits","kind","name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove an extension from the menu","tags":["Voice"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/me":{"get":{"summary":"My own phone line, if one has been registered for me","tags":["Voice"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"registered":{"type":"boolean"},"phoneE164":{"type":"string","nullable":true},"codeSet":{"type":"boolean"},"enrolled":{"type":"boolean"},"pinIssued":{"type":"boolean"},"enabled":{"type":"boolean"},"confirmedAt":{"type":"string","format":"date-time","nullable":true},"lastCallAt":{"type":"string","format":"date-time","nullable":true},"live":{"type":"boolean"}},"required":["registered","phoneE164","codeSet","enrolled","pinIssued","enabled","confirmedAt","lastCallAt","live"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/me/code":{"post":{"summary":"Set or change the code I key in when I call","tags":["Voice"],"description":"Only the owner can call this. Setting a code is also what confirms the registered number is mine — the number alone identifies, and caller ID is settable, so the code is the half that actually holds.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":4,"maxLength":8}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"registered":{"type":"boolean"},"phoneE164":{"type":"string","nullable":true},"codeSet":{"type":"boolean"},"enrolled":{"type":"boolean"},"pinIssued":{"type":"boolean"},"enabled":{"type":"boolean"},"confirmedAt":{"type":"string","format":"date-time","nullable":true},"lastCallAt":{"type":"string","format":"date-time","nullable":true},"live":{"type":"boolean"}},"required":["registered","phoneE164","codeSet","enrolled","pinIssued","enabled","confirmedAt","lastCallAt","live"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Turn my own phone line off","tags":["Voice"],"description":"Clears the code. The registration stays, so it can be turned back on by setting a new one; only an administrator can remove the number itself.","responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/access/{id}/enrolment":{"post":{"summary":"Issue a fresh enrolment PIN","tags":["Voice"],"description":"For somebody who never used theirs, mistyped it too often, or lost the code they chose. Any previous PIN stops working, and an existing code is cleared so the next call enrols again.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"enrolPin":{"type":"string"}},"required":["id","enrolPin"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant":{"get":{"summary":"Geni in the app: who it is talking to and what it can do","tags":["Voice"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"greeting":{"type":"string"},"trial":{"type":"boolean"},"abilityCount":{"type":"number"},"departments":{"type":"array","items":{"type":"object","properties":{"digits":{"type":"string"},"name":{"type":"string"}},"required":["digits","name"],"additionalProperties":false}},"transcription":{"type":"boolean"}},"required":["name","greeting","trial","abilityCount","departments","transcription"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant/turn":{"post":{"summary":"Say (or type) one thing to Geni and get the spoken answer","tags":["Voice"],"description":"Uses the same abilities and the same invoke path as the phone line, under the signed-in person's own roles. Anything that writes comes back as `pending` and runs only when the next turn confirms it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","maxLength":2000,"default":""},"history":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","maxLength":4000}},"required":["role","content"],"additionalProperties":false},"maxItems":40,"default":[]},"department":{"type":"string","maxLength":8},"confirm":{"type":"object","properties":{"token":{"type":"string","maxLength":8000},"answer":{"type":"string","enum":["yes","no"]}},"required":["token","answer"],"additionalProperties":false},"page":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"say":{"type":"string"},"ok":{"type":"boolean"},"tools":{"type":"array","items":{"type":"string"}},"pending":{"type":"object","properties":{"token":{"type":"string"},"prompt":{"type":"string"},"ability":{"type":"string"}},"required":["token","prompt","ability"],"additionalProperties":false}},"required":["say","ok","tools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant/transcribe":{"post":{"summary":"Turn a short spoken WAV into text for Geni","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","minLength":100,"maxLength":900000}},"required":["audio"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant/realtime":{"post":{"summary":"Open a live voice session with the real Geni (same model, voice and rules as the phone line)","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"type":"object","properties":{"page":{"type":"string","maxLength":300}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"clientSecret":{"type":"string"},"expiresAt":{"type":"number"},"greeting":{"type":"string"},"model":{"type":"string"},"voice":{"type":"string"}},"required":["clientSecret","expiresAt","greeting","model","voice"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant/context":{"post":{"summary":"Geni page context: one line saying where in the app the person is, for the live session","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"line":{"type":"string","nullable":true}},"required":["line"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/voice/assistant/invoke":{"post":{"summary":"Run one Geni ability for the live voice session","tags":["Voice"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ability":{"type":"string","minLength":1,"maxLength":120},"args":{"type":"object","additionalProperties":{},"default":{}}},"required":["ability"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"say":{"type":"string"},"data":{}},"required":["ok","say"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}/end":{"post":{"summary":"Mark a call finished","tags":["Video meetings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}":{"delete":{"summary":"Delete a call","tags":["Video meetings"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"force","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"string"}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}/participants":{"post":{"summary":"Add somebody to a call, during or before it","tags":["Video meetings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string"},"externalName":{"type":"string","maxLength":160},"externalEmail":{"type":"string","format":"email"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteToken":{"type":"string","nullable":true}},"required":["id","name","inviteToken"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/now":{"post":{"summary":"Open a room immediately and join it","tags":["Video meetings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"durationMinutes":{"type":"integer","minimum":5,"maximum":480,"default":60},"guestName":{"type":"string","maxLength":160},"guestEmail":{"type":"string","format":"email"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"room":{"type":"string"},"token":{"type":"string"},"displayName":{"type":"string"},"title":{"type":"string"},"guestInviteToken":{"type":"string","nullable":true}},"required":["id","domain","room","token","displayName","title","guestInviteToken"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}/participants/{participantId}/email":{"post":{"summary":"Email a guest their join link","tags":["Video meetings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","format":"email"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"participantId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sentTo":{"type":"string"}},"required":["sentTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/guest/{token}":{"post":{"summary":"What a guest sees, and the room token when it is time","tags":["Video meetings"],"parameters":[{"schema":{"type":"string","minLength":32,"maxLength":64},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string"},"scheduledAt":{"type":"string"},"durationMinutes":{"type":"number"},"guestName":{"type":"string","nullable":true},"status":{"type":"string"},"joinOpensAt":{"type":"string"},"canJoinNow":{"type":"boolean"},"room":{"type":"object","properties":{"domain":{"type":"string"},"room":{"type":"string"},"token":{"type":"string"},"displayName":{"type":"string"}},"required":["domain","room","token","displayName"],"additionalProperties":false,"nullable":true}},"required":["title","scheduledAt","durationMinutes","guestName","status","joinOpensAt","canJoinNow","room"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video":{"get":{"summary":"Scheduled calls, soonest first","tags":["Video meetings"],"parameters":[{"schema":{"type":"string","enum":["upcoming","past","all"],"default":"upcoming"},"in":"query","name":"scope","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"scheduledAt":{"type":"string"},"durationMinutes":{"type":"number"},"status":{"type":"string"},"recordingEnabled":{"type":"boolean"},"joinOpensAt":{"type":"string"},"joinClosesAt":{"type":"string"},"canJoinNow":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string","nullable":true},"name":{"type":"string"},"role":{"type":"string"},"externalEmail":{"type":"string","nullable":true},"hasInvite":{"type":"boolean"},"inviteToken":{"type":"string","nullable":true},"joinedAt":{"type":"string","nullable":true}},"required":["id","personId","name","role","externalEmail","hasInvite","inviteToken","joinedAt"],"additionalProperties":false}}},"required":["id","title","purpose","scheduledAt","durationMinutes","status","recordingEnabled","joinOpensAt","joinClosesAt","canJoinNow","participants"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a call","tags":["Video meetings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"purpose":{"type":"string","maxLength":4000},"scheduledAt":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer","minimum":5,"maximum":480,"default":30},"schoolId":{"type":"string"},"recordingEnabled":{"type":"boolean","default":false},"participants":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"userId":{"type":"string"},"externalName":{"type":"string","maxLength":160},"externalEmail":{"type":"string","format":"email"},"role":{"type":"string","enum":["host","attendee"],"default":"attendee"}},"additionalProperties":false},"default":[]}},"required":["title","scheduledAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}/cancel":{"post":{"summary":"Call it off","tags":["Video meetings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/meetings/video/{id}/token":{"post":{"summary":"A short-lived token for this room, for this person, now","tags":["Video meetings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"domain":{"type":"string"},"room":{"type":"string"},"token":{"type":"string"},"displayName":{"type":"string"},"title":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["domain","room","token","displayName","title","expiresInSeconds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/payments/webhook/stripe/{districtId}?":{"post":{"tags":["Webhooks"],"description":"Stripe payment-event webhook (HMAC-SHA256 via Stripe-Signature header).","parameters":[{"schema":{"type":"string"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/food-payments/webhook/stripe/{districtId}":{"post":{"tags":["Webhooks"],"description":"Stripe events for meal-account top-ups.","parameters":[{"schema":{"type":"string"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sub/profiles":{"get":{"summary":"List substitute teachers in the district pool","tags":["Substitutes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["active","inactive","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a substitute to the pool (emits SubstituteProfileCreated)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"certifications":{"type":"array","items":{"type":"string","maxLength":60},"default":[]},"dailyRateCents":{"type":"integer","minimum":0,"default":0},"halfDayRateCents":{"type":"integer","minimum":0,"default":0},"minNoticeMinutes":{"type":"integer","minimum":0,"maximum":10080,"default":60},"bio":{"type":"string","maxLength":2000},"notes":{"type":"string","maxLength":500}},"required":["personId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/profiles/{id}":{"get":{"summary":"Get a substitute profile","tags":["Substitutes"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a substitute profile (emits SubstituteProfileUpdated)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"certifications":{"type":"array","items":{"type":"string","maxLength":60},"default":[]},"dailyRateCents":{"type":"integer","minimum":0,"default":0},"halfDayRateCents":{"type":"integer","minimum":0,"default":0},"minNoticeMinutes":{"type":"integer","minimum":0,"maximum":10080,"default":60},"bio":{"type":"string","maxLength":2000},"notes":{"type":"string","maxLength":500},"status":{"type":"string","enum":["active","inactive","archived"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/profiles/{id}/archive":{"post":{"summary":"Archive a substitute (emits SubstituteProfileArchived)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":500},"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/profiles/me":{"get":{"summary":"Load the current user's own substitute profile (sub portal)","tags":["Substitutes"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"status":{"type":"string","enum":["active","inactive","archived"]},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"preferredSchoolIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certifications":{"type":"array","items":{"type":"string"}},"dailyRateCents":{"type":"integer"},"halfDayRateCents":{"type":"integer"},"minNoticeMinutes":{"type":"integer"},"bio":{"type":"string","nullable":true},"lastRefreshedAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","status","gradeBands","subjectCodes","preferredSchoolIds","certifications","dailyRateCents","halfDayRateCents","minNoticeMinutes","bio","lastRefreshedAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences":{"get":{"summary":"List staff absences","tags":["Substitutes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"staffPersonId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Report a staff absence (emits StaffAbsenceReported)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean","default":false},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","maxLength":500},"mustFill":{"type":"boolean","default":true}},"required":["staffPersonId","startDate","endDate","reasonCode"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/mine":{"get":{"summary":"List the acting teacher's own absences (scoped server-side by personId)","tags":["Substitutes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/{id}":{"get":{"summary":"Get a staff absence","tags":["Substitutes"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/report-mine":{"post":{"summary":"Report the acting teacher's own absence (scoped server-side by personId)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean","default":false},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","maxLength":500},"mustFill":{"type":"boolean","default":true}},"required":["startDate","endDate","reasonCode"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/{id}/approve":{"post":{"summary":"Approve a reported absence (emits StaffAbsenceApproved)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/{id}/deny":{"post":{"summary":"Deny a reported absence (emits StaffAbsenceDenied)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/absences/{id}/cancel":{"post":{"summary":"Cancel a reported absence (emits StaffAbsenceCancelled + SubJobCancelled per open job)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"autoJobIds":{"type":"array","items":{"type":"string","format":"uuid"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs":{"get":{"summary":"List sub jobs","tags":["Substitutes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"absenceId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Post a sub job against an approved absence (emits SubJobPosted)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean","default":false},"payRateCents":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500}},"required":["absenceId","workDate","payRateCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}":{"get":{"summary":"Get a sub job with offers + assignment + absence","tags":["Substitutes"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}/offer":{"post":{"summary":"Offer a sub job to a specific substitute (emits SubJobOffered)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"substituteProfileId":{"type":"string","format":"uuid"},"matchScore":{"type":"integer","minimum":0,"maximum":100,"default":50},"expiresAt":{"type":"string","format":"date-time"}},"required":["substituteProfileId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}/assign":{"post":{"summary":"Manually assign a sub to a job (emits SubJobFilled; rescinds pending offers)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"substituteProfileId":{"type":"string","format":"uuid"}},"required":["substituteProfileId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}/cancel":{"post":{"summary":"Cancel a sub job (emits SubJobCancelled; rescinds pending offers)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}/complete":{"post":{"summary":"Close out a filled job with clock-in/out (emits SubJobCompleted)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actualStart":{"type":"string","format":"date-time"},"actualEnd":{"type":"string","format":"date-time"},"payoutCents":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/jobs/{id}/auto-match":{"post":{"summary":"Rank substitute pool against a job (emits SubJobAutoMatched; optionally sends offers)","tags":["Substitutes"],"description":"Scores all active substitutes against availability, school preference, certifications, and recent load. Returns ranked candidates. When sendOffers=true, dispatches offers to the top sendTopN candidates automatically. Offer dispatch is idempotent — safe to run multiple times.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["true","false","1","0"],"default":"false"},"in":"query","name":"sendOffers","required":false},{"schema":{"type":"integer","minimum":1,"maximum":20,"default":3},"in":"query","name":"sendTopN","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"candidates":{"type":"array","items":{"type":"object","properties":{"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"isAvailable":{"type":"boolean"},"schoolPreferred":{"type":"boolean"},"hasCertifications":{"type":"boolean"},"recentJobCount":{"type":"integer"},"reasons":{"type":"array","items":{"type":"string"}},"offerId":{"type":"string","format":"uuid"}},"required":["substituteProfileId","score","isAvailable","schoolPreferred","hasCertifications","recentJobCount","reasons"],"additionalProperties":false}},"offersCreated":{"type":"integer"}},"required":["jobId","candidates","offersCreated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/reports/summary":{"get":{"summary":"District-wide sub-pool KPIs (fill rate, time-to-fill, unfilled mustFill)","tags":["Substitutes"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"poolCount":{"type":"integer"},"activePoolCount":{"type":"integer"},"openAbsenceCount":{"type":"integer"},"openJobCount":{"type":"integer"},"filledTodayCount":{"type":"integer"},"fillRate30d":{"type":"number"},"avgTimeToFillMinutes30d":{"type":"integer"},"unfilledMustFillCount":{"type":"integer"}},"required":["poolCount","activePoolCount","openAbsenceCount","openJobCount","filledTodayCount","fillRate30d","avgTimeToFillMinutes30d","unfilledMustFillCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/portal/my-board":{"get":{"summary":"List the acting substitute's open offers, accepted assignments, and general job board","tags":["Substitutes"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"openJobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isEligible":{"type":"boolean"},"hasOfferForMe":{"type":"boolean"},"myOfferStatus":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"],"nullable":true},"myOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","format":"date-time"},"matchScore":{"type":"integer"}},"required":["id","expiresAt","matchScore"],"additionalProperties":false,"nullable":true}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt","isEligible","hasOfferForMe","myOfferStatus"],"additionalProperties":false}},"myOffers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isEligible":{"type":"boolean"},"hasOfferForMe":{"type":"boolean"},"myOfferStatus":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"],"nullable":true},"myOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","format":"date-time"},"matchScore":{"type":"integer"}},"required":["id","expiresAt","matchScore"],"additionalProperties":false,"nullable":true}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt","isEligible","hasOfferForMe","myOfferStatus"],"additionalProperties":false}},"myAssignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isEligible":{"type":"boolean"},"hasOfferForMe":{"type":"boolean"},"myOfferStatus":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"],"nullable":true},"myOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","format":"date-time"},"matchScore":{"type":"integer"}},"required":["id","expiresAt","matchScore"],"additionalProperties":false,"nullable":true}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt","isEligible","hasOfferForMe","myOfferStatus"],"additionalProperties":false}},"notOnboarded":{"type":"boolean","default":false},"onboardingContact":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"role":{"type":"string"}},"required":["name","email","role"],"additionalProperties":false,"nullable":true}},"required":["openJobs","myOffers","myAssignments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/portal/offers/{id}/accept":{"post":{"summary":"Accept a pending offer (emits SubJobOfferAccepted + SubJobFilled)","tags":["Substitutes"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/sub/portal/offers/{id}/decline":{"post":{"summary":"Decline a pending offer (emits SubJobOfferDeclined)","tags":["Substitutes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"absenceId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"sectionIds":{"type":"array","items":{"type":"string","format":"uuid"}},"workDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"payRateCents":{"type":"integer"},"status":{"type":"string","enum":["open","offered","filled","cancelled","completed"]},"postedByUserId":{"type":"string","format":"uuid","nullable":true},"postedAt":{"type":"string","format":"date-time"},"filledByProfileId":{"type":"string","format":"uuid","nullable":true},"filledByName":{"type":"string","nullable":true},"filledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","declined","expired","rescinded"]},"matchScore":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time","nullable":true},"declineReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","status","matchScore","expiresAt","respondedAt","declineReason","createdAt","updatedAt"],"additionalProperties":false}},"assignment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"uuid"},"substituteProfileId":{"type":"string","format":"uuid"},"substituteName":{"type":"string"},"plannedStart":{"type":"string","format":"date-time"},"plannedEnd":{"type":"string","format":"date-time"},"actualStart":{"type":"string","format":"date-time","nullable":true},"actualEnd":{"type":"string","format":"date-time","nullable":true},"payrollStatus":{"type":"string","enum":["approved","adjusted","paid"]},"payoutCents":{"type":"integer"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","jobId","substituteProfileId","plannedStart","plannedEnd","actualStart","actualEnd","payrollStatus","payoutCents","notes","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"absence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"halfDay":{"type":"boolean"},"reasonCode":{"type":"string","enum":["sick","personal","pd","jury","bereavement","fmla","other"]},"reasonNotes":{"type":"string","nullable":true},"mustFill":{"type":"boolean"},"status":{"type":"string","enum":["submitted","approved","denied","cancelled"]},"approvedByUserId":{"type":"string","format":"uuid","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"denyReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"jobCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","staffPersonId","schoolId","startDate","endDate","halfDay","reasonCode","reasonNotes","mustFill","status","approvedByUserId","approvedAt","denyReason","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","absenceId","schoolId","sectionIds","workDate","halfDay","payRateCents","status","postedByUserId","postedAt","filledByProfileId","filledAt","cancelledReason","cancelledAt","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs":{"get":{"summary":"List teacher certifications","tags":["Certifications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"personId","required":false},{"schema":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"query","name":"stateCode","required":false},{"schema":{"type":"integer","minimum":1,"maximum":365},"in":"query","name":"expiresWithinDays","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a certification (emits TeacherCertificationCreated)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string","minLength":1,"maxLength":64},"certLabel":{"type":"string","minLength":1,"maxLength":200},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"certNumber":{"type":"string","maxLength":64},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"],"default":"active"},"source":{"type":"string","enum":["manual","doe_import","self_report"],"default":"manual"},"documentUrl":{"type":"string","format":"uri","maxLength":500},"notes":{"type":"string","maxLength":500}},"required":["personId","stateCode","category","certCode","certLabel","issuedAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/{id}":{"get":{"summary":"Get a single certification","tags":["Certifications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a certification (emits TeacherCertificationUpdated)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string","minLength":1,"maxLength":64},"certLabel":{"type":"string","minLength":1,"maxLength":200},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"certNumber":{"type":"string","maxLength":64},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"],"default":"active"},"source":{"type":"string","enum":["manual","doe_import","self_report"],"default":"manual"},"documentUrl":{"type":"string","format":"uri","maxLength":500},"notes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/{id}/revoke":{"post":{"summary":"Mark a certification revoked (emits TeacherCertificationRevoked)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/sweep-expirations":{"post":{"summary":"Sweep expired certs (manual trigger — normally runs on schedule). Emits TeacherCertificationExpired per flipped row.","tags":["Certifications"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"expired":{"type":"integer"},"ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["expired","ids"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/certs/assignment-check":{"get":{"summary":"Check whether a person holds the certs required for a given role/subject/grade assignment","tags":["Certifications"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"personId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"roleKey","required":true},{"schema":{"type":"string","maxLength":20},"in":"query","name":"subjectCode","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"gradeBand","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eligible":{"type":"boolean"},"matchingCerts":{"type":"array","items":{"type":"object","properties":{"certificationId":{"type":"string","format":"uuid"},"certCode":{"type":"string"},"certLabel":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true}},"required":["certificationId","certCode","certLabel","expiresAt"],"additionalProperties":false}},"unmetRequirements":{"type":"array","items":{"type":"object","properties":{"requirementId":{"type":"string","format":"uuid"},"roleKey":{"type":"string"},"allowedCertCodes":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}},"required":["requirementId","roleKey","allowedCertCodes","reason"],"additionalProperties":false}}},"required":["eligible","matchingCerts","unmetRequirements"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/requirements":{"get":{"summary":"List certification requirement rules","tags":["Certifications"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"roleKey","required":false},{"schema":{"type":"boolean"},"in":"query","name":"activeOnly","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roleKey":{"type":"string"},"allowedCertCodes":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"gradeBands":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","roleKey","allowedCertCodes","subjectCodes","gradeBands","description","active","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a cert requirement rule (emits CertificationRequirementCreated)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":64},"allowedCertCodes":{"type":"array","items":{"type":"string","maxLength":64},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"description":{"type":"string","maxLength":500},"active":{"type":"boolean","default":true}},"required":["roleKey"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roleKey":{"type":"string"},"allowedCertCodes":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"gradeBands":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","roleKey","allowedCertCodes","subjectCodes","gradeBands","description","active","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/requirements/{id}":{"patch":{"summary":"Update a cert requirement rule (emits CertificationRequirementUpdated)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":64},"allowedCertCodes":{"type":"array","items":{"type":"string","maxLength":64},"default":[]},"subjectCodes":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"gradeBands":{"type":"array","items":{"type":"string","maxLength":20},"default":[]},"description":{"type":"string","maxLength":500},"active":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roleKey":{"type":"string"},"allowedCertCodes":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"gradeBands":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","roleKey","allowedCertCodes","subjectCodes","gradeBands","description","active","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certs/requirements/{id}/deactivate":{"post":{"summary":"Deactivate a cert requirement rule (emits CertificationRequirementDeactivated)","tags":["Certifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roleKey":{"type":"string"},"allowedCertCodes":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"gradeBands":{"type":"array","items":{"type":"string"}},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","roleKey","allowedCertCodes","subjectCodes","gradeBands","description","active","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/certifications/mine":{"get":{"summary":"The signed-in person’s own certifications","tags":["Certifications"],"description":"Scoped to the caller. Needs only a session — not cert.read, and not the HR module.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"personName":{"type":"string"},"stateCode":{"type":"string","minLength":2,"maxLength":2},"category":{"type":"string","enum":["teaching","instructional","educational_services","administrative","specialist","emergency","substitute","other"]},"certCode":{"type":"string"},"certLabel":{"type":"string"},"gradeBands":{"type":"array","items":{"type":"string"}},"subjectCodes":{"type":"array","items":{"type":"string"}},"certNumber":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","expired","suspended","revoked","pending"]},"source":{"type":"string","enum":["manual","doe_import","self_report"]},"documentUrl":{"type":"string","format":"uri","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","personId","stateCode","category","certCode","certLabel","gradeBands","subjectCodes","certNumber","issuedAt","expiresAt","status","source","documentUrl","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees":{"get":{"summary":"List employees","tags":["HR"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolOrganizationId","required":false},{"schema":{"type":"string","maxLength":50},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"bargainingUnit","required":false},{"schema":{"type":"string","enum":["active","separated","all"],"default":"active"},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}":{"get":{"summary":"One employee file: person, employment, assignments, contracts, contacts, history; salary and documents by permission","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update the person and employment fields on an employee file","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"preferredName":{"type":"string","maxLength":100,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"phoneMobile":{"type":"string","maxLength":30,"nullable":true},"phoneHome":{"type":"string","maxLength":30,"nullable":true},"dateOfBirth":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"department":{"type":"string","maxLength":50,"nullable":true},"homeroom":{"type":"string","maxLength":50,"nullable":true},"isTeacher":{"type":"boolean"},"isNurse":{"type":"boolean"},"isCaseManager":{"type":"boolean"},"includeInNjsmart":{"type":"boolean"},"isSharedStaff":{"type":"boolean"},"employmentBeginDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"districtEntryCode":{"type":"string","maxLength":10,"nullable":true},"employmentEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"employmentExitReasonCode":{"type":"string","maxLength":10,"nullable":true},"employmentStatusCode":{"type":"string","maxLength":10,"nullable":true},"separationTypeCode":{"type":"string","maxLength":10,"nullable":true},"highestEducationLevel":{"type":"string","maxLength":10,"nullable":true},"yearsPriorExperience":{"type":"integer","minimum":0,"maximum":70,"nullable":true},"yearsInNj":{"type":"integer","minimum":0,"maximum":70,"nullable":true},"yearsInLea":{"type":"integer","minimum":0,"maximum":70,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/contracts":{"post":{"summary":"Add a contract. board.approved=false files it for the next meeting instead of applying it","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"]},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"positionTitle":{"type":"string","minLength":1,"maxLength":200},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"workDaysPerYear":{"type":"integer","minimum":1,"maximum":366,"nullable":true},"hoursPerDay":{"type":"number","minimum":0,"maximum":24,"nullable":true},"tenureOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"seniorityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"probationEndsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["contractType","positionTitle","startsOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/separation":{"post":{"summary":"Record a resignation, retirement or termination; ends the contract and pay. board.approved=false files it instead","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"employmentEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"separationTypeCode":{"type":"string","maxLength":10,"nullable":true},"employmentExitReasonCode":{"type":"string","maxLength":10,"nullable":true},"reason":{"type":"string","maxLength":300,"nullable":true},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["employmentEndDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/contracts/{id}":{"patch":{"summary":"Correct a contract","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"]},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"positionTitle":{"type":"string","minLength":1,"maxLength":200},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"workDaysPerYear":{"type":"integer","minimum":1,"maximum":366,"nullable":true},"hoursPerDay":{"type":"number","minimum":0,"maximum":24,"nullable":true},"tenureOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"seniorityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"probationEndsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["active","ended"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/contacts":{"post":{"summary":"Add an emergency contact","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"relationship":{"type":"string","maxLength":80,"nullable":true},"phone":{"type":"string","minLength":3,"maxLength":30},"altPhone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"isPrimary":{"type":"boolean"}},"required":["name","phone"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/contacts/{id}":{"patch":{"summary":"Update an emergency contact","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"relationship":{"type":"string","maxLength":80,"nullable":true},"phone":{"type":"string","minLength":3,"maxLength":30},"altPhone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"isPrimary":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove an emergency contact","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/notes":{"post":{"summary":"Add a dated note to the employee history","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":300},"occurredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["summary"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides":{"get":{"summary":"List salary guides","tags":["HR"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"bargainingUnit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a salary guide (lanes and steps; amounts come next)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bargainingUnit":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":200},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"effectiveOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lanes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":20},"minItems":1,"maxItems":30},"steps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":20},"minItems":1,"maxItems":60},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["bargainingUnit","name","fiscalYear","effectiveOn","lanes","steps"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides/{id}":{"get":{"summary":"A salary guide with its rate grid","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename, restructure or adopt a guide","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bargainingUnit":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":200},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"effectiveOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lanes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":20},"minItems":1,"maxItems":30},"steps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":20},"minItems":1,"maxItems":60},"notes":{"type":"string","maxLength":5000,"nullable":true},"status":{"type":"string","enum":["draft","adopted","superseded"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides/{id}/rates":{"put":{"summary":"Set the whole rate grid; cells not sent are removed","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rates":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","minLength":1,"maxLength":20},"lane":{"type":"string","minLength":1,"maxLength":20},"amountCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["step","lane","amountCents"],"additionalProperties":false},"maxItems":2000}},"required":["rates"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides/{id}/rates/import":{"post":{"summary":"Load the grid from CSV: first column is the step, remaining headers are lanes, cells are dollars","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"apply":{"type":"boolean","default":false}},"required":["csv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides/{id}/advance/preview":{"post":{"summary":"Preview moving everyone on this guide one step onto the target guide","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetGuideId":{"type":"string","format":"uuid"},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"holdPersonIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]}},"required":["targetGuideId","effectiveFrom"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/salary-guides/{id}/advance/apply":{"post":{"summary":"Apply the step advance: one new placement per movable person","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetGuideId":{"type":"string","format":"uuid"},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"holdPersonIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]}},"required":["targetGuideId","effectiveFrom"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/placements":{"post":{"summary":"Place an employee on a guide (or an off-guide salary). board.approved=false files it for the next meeting instead","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"guideId":{"type":"string","format":"uuid","nullable":true},"step":{"type":"string","maxLength":20,"nullable":true},"lane":{"type":"string","maxLength":20,"nullable":true},"guideAmountCents":{"type":"integer","minimum":0,"maximum":100000000},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"stipends":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"amountCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["label","amountCents"],"additionalProperties":false},"default":[]},"longevityCents":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["effectiveFrom"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/placements/{id}":{"patch":{"summary":"Correct a placement (amounts are recomputed)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"guideId":{"type":"string","format":"uuid","nullable":true},"step":{"type":"string","maxLength":20,"nullable":true},"lane":{"type":"string","maxLength":20,"nullable":true},"guideAmountCents":{"type":"integer","minimum":0,"maximum":100000000},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"stipends":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"amountCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["label","amountCents"],"additionalProperties":false},"default":[]},"longevityCents":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a placement that has not started yet","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/payroll-export":{"get":{"summary":"CSV of active employees and their pay; with ?since= only those changed since that date","tags":["HR"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"since","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/hr/employees/{personId}/documents":{"get":{"summary":"Files in the personnel folder","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a file to the personnel folder","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/documents/{id}/download":{"get":{"summary":"Download a personnel file","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/hr/documents/{id}/view":{"get":{"summary":"View a personnel file in the browser","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/hr/documents/{id}":{"delete":{"summary":"Remove a personnel file","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/actions":{"get":{"summary":"Personnel actions by status","tags":["HR"],"parameters":[{"schema":{"type":"string","enum":["pending","on_agenda","approved","rejected","withdrawn","open"],"default":"open"},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"personId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/actions/{id}/withdraw":{"post":{"summary":"Withdraw an action before the vote","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300}},"additionalProperties":false,"default":{}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/resolutions":{"post":{"summary":"Put pending actions on a board meeting as one personnel resolution","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"meetingId":{"type":"string","format":"uuid"},"actionIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500},"title":{"type":"string","maxLength":300}},"required":["meetingId","actionIds"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/resolutions/{id}":{"get":{"summary":"A personnel resolution and its actions","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/resolutions/{id}/decide":{"post":{"summary":"Record the vote; approved actions are applied to the employee files","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decidedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"approved":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"rejected":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"notes":{"type":"string","maxLength":1000}},"required":["decidedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/postings":{"get":{"summary":"Job postings","tags":["HR"],"parameters":[{"schema":{"type":"string","enum":["draft","open","closed","filled","cancelled","active","all"],"default":"active"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a posting (as a draft unless postedOn is given)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"schoolOrganizationId":{"type":"string","format":"uuid","nullable":true},"department":{"type":"string","maxLength":50,"nullable":true},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"],"default":"non_tenured"},"jobCode":{"type":"string","maxLength":10,"nullable":true},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"salaryGuideId":{"type":"string","format":"uuid","nullable":true},"salaryText":{"type":"string","maxLength":200,"nullable":true},"description":{"type":"string","maxLength":20000,"nullable":true},"requirements":{"type":"string","maxLength":5000,"nullable":true},"openings":{"type":"integer","minimum":1,"maximum":100,"default":1},"postedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"closesOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"vacancyId":{"type":"string","format":"uuid","nullable":true},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/postings/{id}":{"get":{"summary":"A posting with its applicants","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a posting or change its status","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"schoolOrganizationId":{"type":"string","format":"uuid","nullable":true},"department":{"type":"string","maxLength":50,"nullable":true},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"],"default":"non_tenured"},"jobCode":{"type":"string","maxLength":10,"nullable":true},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"salaryGuideId":{"type":"string","format":"uuid","nullable":true},"salaryText":{"type":"string","maxLength":200,"nullable":true},"description":{"type":"string","maxLength":20000,"nullable":true},"requirements":{"type":"string","maxLength":5000,"nullable":true},"openings":{"type":"integer","minimum":1,"maximum":100,"default":1},"postedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"closesOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"vacancyId":{"type":"string","format":"uuid","nullable":true},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"status":{"type":"string","enum":["draft","open","closed","filled","cancelled"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/postings/{id}/applicants":{"post":{"summary":"Add an applicant","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"source":{"type":"string","enum":["website","njschooljobs","referral","internal","agency","other"],"default":"other"},"appliedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"personId":{"type":"string","format":"uuid","nullable":true},"certifications":{"type":"string","maxLength":5000,"nullable":true},"notes":{"type":"string","maxLength":20000,"nullable":true}},"required":["firstName","lastName"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/applicants/{id}":{"patch":{"summary":"Move an applicant along, add an interview, or close them out","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"source":{"type":"string","enum":["website","njschooljobs","referral","internal","agency","other"],"default":"other"},"appliedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"personId":{"type":"string","format":"uuid","nullable":true},"certifications":{"type":"string","maxLength":5000,"nullable":true},"notes":{"type":"string","maxLength":20000,"nullable":true},"status":{"type":"string","enum":["new","screening","interview","recommended","offered","hired","declined","withdrawn","rejected"]},"addInterview":{"type":"object","properties":{"on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"interviewer":{"type":"string","maxLength":200},"format":{"type":"string","maxLength":60},"score":{"type":"number","minimum":0,"maximum":10,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["on","interviewer"],"additionalProperties":false},"decisionNote":{"type":"string","maxLength":500,"nullable":true},"offerSentOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"offerAcceptedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/applicants/{id}/recommend":{"post":{"summary":"Recommend for hire: the offer goes to the board (or applies now when already approved)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"phoneMobile":{"type":"string","maxLength":30,"nullable":true},"dateOfBirth":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"localId":{"type":"string","maxLength":50,"nullable":true}},"additionalProperties":false},"offer":{"type":"object","properties":{"contract":{"type":"object","properties":{"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"]},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"positionTitle":{"type":"string","minLength":1,"maxLength":200},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"workDaysPerYear":{"type":"integer","minimum":1,"maximum":366,"nullable":true},"hoursPerDay":{"type":"number","minimum":0,"maximum":24,"nullable":true},"tenureOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"seniorityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"probationEndsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["contractType","positionTitle","startsOn"],"additionalProperties":false},"placement":{"type":"object","properties":{"guideId":{"type":"string","format":"uuid","nullable":true},"step":{"type":"string","maxLength":20,"nullable":true},"lane":{"type":"string","maxLength":20,"nullable":true},"guideAmountCents":{"type":"integer","minimum":0,"maximum":100000000},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"stipends":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"amountCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["label","amountCents"],"additionalProperties":false},"default":[]},"longevityCents":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true}},"required":["effectiveFrom"],"additionalProperties":false,"nullable":true},"schoolOrganizationId":{"type":"string","format":"uuid","nullable":true},"jobCode":{"type":"string","maxLength":10,"nullable":true},"department":{"type":"string","maxLength":50,"nullable":true},"isTeacher":{"type":"boolean","default":false},"certificated":{"type":"boolean","default":false},"pensionEligible":{"type":"boolean","default":true}},"required":["contract"],"additionalProperties":false},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["offer"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/hires":{"post":{"summary":"Hire without a posting: person details plus the offer; board switch as elsewhere","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"phoneMobile":{"type":"string","maxLength":30,"nullable":true},"dateOfBirth":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"localId":{"type":"string","maxLength":50,"nullable":true}},"required":["firstName","lastName"],"additionalProperties":false},"offer":{"type":"object","properties":{"contract":{"type":"object","properties":{"contractType":{"type":"string","enum":["tenured","non_tenured","annual","at_will","per_diem","contracted_service"]},"bargainingUnit":{"type":"string","maxLength":80,"nullable":true},"positionTitle":{"type":"string","minLength":1,"maxLength":200},"hrPositionId":{"type":"string","format":"uuid","nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"workDaysPerYear":{"type":"integer","minimum":1,"maximum":366,"nullable":true},"hoursPerDay":{"type":"number","minimum":0,"maximum":24,"nullable":true},"tenureOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"seniorityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"probationEndsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["contractType","positionTitle","startsOn"],"additionalProperties":false},"placement":{"type":"object","properties":{"guideId":{"type":"string","format":"uuid","nullable":true},"step":{"type":"string","maxLength":20,"nullable":true},"lane":{"type":"string","maxLength":20,"nullable":true},"guideAmountCents":{"type":"integer","minimum":0,"maximum":100000000},"fte":{"type":"number","minimum":0.01,"maximum":1,"default":1},"stipends":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"amountCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["label","amountCents"],"additionalProperties":false},"default":[]},"longevityCents":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true}},"required":["effectiveFrom"],"additionalProperties":false,"nullable":true},"schoolOrganizationId":{"type":"string","format":"uuid","nullable":true},"jobCode":{"type":"string","maxLength":10,"nullable":true},"department":{"type":"string","maxLength":50,"nullable":true},"isTeacher":{"type":"boolean","default":false},"certificated":{"type":"boolean","default":false},"pensionEligible":{"type":"boolean","default":true}},"required":["contract"],"additionalProperties":false},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["person","offer"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/onboarding/template":{"get":{"summary":"The onboarding checklist template","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/onboarding":{"get":{"summary":"Everyone with an open onboarding item","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/onboarding":{"get":{"summary":"One person’s checklist","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start the checklist for a person","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"certificated":{"type":"boolean","default":false},"pensionEligible":{"type":"boolean","default":true}},"required":["startsOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/onboarding/tasks":{"post":{"summary":"Add a one-off task to a person’s checklist","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"guidance":{"type":"string","maxLength":500,"nullable":true},"required":{"type":"boolean","default":true},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["label"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/onboarding/tasks/{id}":{"patch":{"summary":"Complete, reopen, waive or annotate a task","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"completedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"waivedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true},"documentId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/policies":{"get":{"summary":"Leave policies by bargaining unit","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Create or update policies (matched on unit + type)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"bargainingUnit":{"type":"string","minLength":1,"maxLength":80},"leaveType":{"type":"string","enum":["sick","personal","vacation","bereavement","professional","jury","other"]},"annualDays":{"type":"number","minimum":0,"maximum":365},"accrual":{"type":"string","enum":["front_loaded","monthly","per_pay"],"default":"front_loaded"},"carryover":{"type":"string","enum":["none","unlimited","capped"],"default":"none"},"carryoverCapDays":{"type":"number","minimum":0,"maximum":999,"nullable":true},"prorateFirstYear":{"type":"boolean","default":true},"appliesToTenMonth":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["bargainingUnit","leaveType","annualDays"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["policies"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/policies/defaults":{"post":{"summary":"Load a New Jersey starting set for the default unit (*); existing rows are kept","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/policies/{id}":{"delete":{"summary":"Remove a policy","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/balances":{"get":{"summary":"Balances for everyone, one row per person","tags":["HR"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolOrganizationId","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"bargainingUnit","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"fiscalYear":{"type":"number"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","fiscalYear","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/open-year":{"post":{"summary":"Grant the year’s days to every active employee (safe to rerun)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["fiscalYear"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/accrue":{"post":{"summary":"Post monthly accruals through a date","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false,"default":{}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leave/backfill":{"post":{"summary":"Post uses for absences approved before leave tracking existed","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/leave":{"get":{"summary":"Balances, transactions, leaves of absence and FMLA/NJFLA use for one person","tags":["HR"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/leave/adjust":{"post":{"summary":"Add or remove days with a reason (opening balance, correction, payout)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"leaveType":{"type":"string","enum":["sick","personal","vacation","bereavement","professional","jury","other"]},"fiscalYear":{"type":"integer"},"days":{"type":"number","minimum":-999,"maximum":999},"kind":{"type":"string","enum":["adjustment","opening","payout"],"default":"adjustment"},"note":{"type":"string","minLength":1,"maxLength":300},"onDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["leaveType","days","note"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leaves":{"get":{"summary":"Leaves of absence","tags":["HR"],"parameters":[{"schema":{"type":"string","enum":["open","requested","pending_board","approved","active","ended","denied","withdrawn","all"],"default":"open"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/leaves":{"post":{"summary":"Record a leave of absence; board.approved=false files it for the next meeting","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["fmla","njfla","medical","maternity","child_rearing","military","sabbatical","unpaid","other"]},"paid":{"type":"boolean","default":false},"paidFrom":{"type":"string","enum":["sick","vacation","personal"],"nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expectedReturnOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"intermittent":{"type":"boolean","default":false},"positionHeld":{"type":"boolean","default":true},"coverageNote":{"type":"string","maxLength":500,"nullable":true},"reason":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"board":{"type":"object","properties":{"approved":{"type":"boolean","default":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false,"default":{"approved":true}}},"required":["kind","startsOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/leaves/{id}":{"patch":{"summary":"Update a leave: dates, return, end it, withdraw it","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["fmla","njfla","medical","maternity","child_rearing","military","sabbatical","unpaid","other"]},"paid":{"type":"boolean","default":false},"paidFrom":{"type":"string","enum":["sick","vacation","personal"],"nullable":true},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expectedReturnOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"intermittent":{"type":"boolean","default":false},"positionHeld":{"type":"boolean","default":true},"coverageNote":{"type":"string","maxLength":500,"nullable":true},"reason":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"returnedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["active","ended","withdrawn","denied"]},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/summary":{"get":{"summary":"Equipment and offboarding figures","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/available":{"get":{"summary":"Inventory that can be issued (active, unassigned)","tags":["HR"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/issued":{"get":{"summary":"Everything issued and still out","tags":["HR"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ackStatus":{"type":"string","enum":["not_requested","pending","signed"]}},"required":["ackStatus"],"additionalProperties":true}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/onboarding":{"get":{"summary":"New hires and where their equipment stands","tags":["HR"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/equipment":{"get":{"summary":"What a person holds, what they returned, and their offboarding file","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"current":{"type":"array","items":{"type":"object","properties":{"issue":{"type":"object","properties":{"status":{"type":"string","enum":["issued","returned","written_off","charged"]},"ackStatus":{"type":"string","enum":["not_requested","pending","signed"]}},"required":["status","ackStatus"],"additionalProperties":true,"nullable":true}},"required":["issue"],"additionalProperties":true}},"history":{"type":"array","items":{"type":"object","properties":{"issue":{"type":"object","properties":{"status":{"type":"string","enum":["issued","returned","written_off","charged"]},"ackStatus":{"type":"string","enum":["not_requested","pending","signed"]}},"required":["status","ackStatus"],"additionalProperties":true}},"required":["issue"],"additionalProperties":true}}},"required":["current","history"],"additionalProperties":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Issue an item to an employee (existing asset or a new one)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","nullable":true},"newAsset":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"tag":{"type":"string","maxLength":40,"nullable":true},"serialNumber":{"type":"string","maxLength":100,"nullable":true},"manufacturer":{"type":"string","maxLength":100,"nullable":true},"model":{"type":"string","maxLength":100,"nullable":true},"purchaseCostCents":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true}},"required":["name","category"],"additionalProperties":false,"nullable":true},"issuedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"conditionOut":{"type":"string","enum":["new","good","fair","poor"],"default":"good"},"signedName":{"type":"string","maxLength":200,"nullable":true},"requestAck":{"type":"boolean","default":false},"onboardingTaskKey":{"type":"string","enum":["badge","accounts"],"nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/issues/{id}/acknowledge":{"post":{"summary":"Record the employee signing for an item","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signedName":{"type":"string","minLength":2,"maxLength":200}},"required":["signedName"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/equipment/issues/{id}/return":{"post":{"summary":"An item comes back while the person is still employed","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken"]},"receivedByName":{"type":"string","maxLength":200,"nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true}},"required":["condition"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/onboarding/accounts-request":{"post":{"summary":"Ask the technology team to create a new hire’s accounts","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding":{"get":{"summary":"Offboarding files","tags":["HR"],"parameters":[{"schema":{"type":"string","enum":["open","cleared","all"],"default":"open"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["open","cleared"]}},"required":["status"],"additionalProperties":true}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/employees/{personId}/offboarding":{"post":{"summary":"Open an offboarding file by hand (for a separation recorded before this existed)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"separationDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/{id}":{"get":{"summary":"One offboarding file","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["open","cleared"]},"tasks":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["equipment_return","accounts","building_access","final_timesheet","pension_notice","benefits_notice","custom"]},"status":{"type":"string","enum":["open","done","waived","returned","written_off","charged","settled"]},"chargeMethod":{"type":"string","enum":["repayment_agreement","invoice"],"nullable":true}},"required":["kind","status","chargeMethod"],"additionalProperties":true}}},"required":["status","tasks"],"additionalProperties":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Notes on an offboarding file","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":10000,"nullable":true}},"required":["notes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/{id}/tasks":{"post":{"summary":"Add a task to an offboarding file","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":2,"maxLength":200},"guidance":{"type":"string","maxLength":1000,"nullable":true},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"required":{"type":"boolean","default":true}},"required":["label"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/{id}/clear":{"post":{"summary":"Mark the file cleared and closed (every task must be closed)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/{id}/reopen":{"post":{"summary":"Reopen a cleared file","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"default":{}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/complete":{"post":{"summary":"Mark a task done","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"nullable":true},"completedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/waive":{"post":{"summary":"Waive a task, with the reason","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/return":{"post":{"summary":"Equipment returned: condition, who received it, when","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken"]},"receivedByName":{"type":"string","maxLength":200,"nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true}},"required":["condition"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/write-off":{"post":{"summary":"Write an item off, with the reason and approver","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500},"approver":{"type":"string","minLength":2,"maxLength":200}},"required":["reason","approver"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/charge":{"post":{"summary":"Charge the former employee for an unreturned item (never deducted from pay)","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","minimum":1,"maximum":10000000},"method":{"type":"string","enum":["repayment_agreement","invoice"]},"reference":{"type":"string","maxLength":120,"nullable":true},"signedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"note":{"type":"string","maxLength":1000,"nullable":true}},"required":["amountCents","method"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/settle":{"post":{"summary":"Record payment of a charge","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"settledOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"amountCents":{"type":"integer","minimum":0,"maximum":10000000},"note":{"type":"string","maxLength":500,"nullable":true}},"required":["amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/reopen":{"post":{"summary":"Reopen a closed task","tags":["HR"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false,"default":{}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/hr/offboarding/tasks/{id}/charge-document":{"get":{"summary":"The repayment agreement or invoice for a charge, for printing","tags":["HR"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"method":{"type":"string","enum":["repayment_agreement","invoice"]},"status":{"type":"string","enum":["open","done","waived","returned","written_off","charged","settled"]}},"required":["method","status"],"additionalProperties":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/settings":{"get":{"summary":"Get the district facilities settings (SLAs, ticket format, depreciation defaults)","tags":["Facilities"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"slaUrgentMinutes":{"type":"integer"},"slaHighMinutes":{"type":"integer"},"slaNormalMinutes":{"type":"integer"},"slaLowMinutes":{"type":"integer"},"ticketNumberFormat":{"type":"string"},"depreciationDefaults":{"type":"object","required":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"],"properties":{"chromebook":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"laptop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"desktop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"tablet":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"projector":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"doc_camera":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"printer":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"aed":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"musical_instrument":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"av_other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"furniture":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"phone":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"hotspot":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"keys":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"access_fob":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"id_badge":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"uniform":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"radio":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false}},"additionalProperties":false},"qualityReportEnabled":{"type":"boolean"},"qualityReportRecipients":{"type":"array","items":{"type":"string","format":"email"}},"qualityReportLastSentAt":{"type":"string","format":"date-time","nullable":true},"workOrderCreatorTitles":{"type":"array","items":{"type":"string"}},"workOrderTradeTitles":{"type":"array","items":{"type":"string"}},"titleListsPersisted":{"type":"boolean"},"checklistMasterPinSet":{"type":"boolean"},"checklistMasterPinSetAt":{"type":"string","format":"date-time","nullable":true},"persisted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["districtId","slaUrgentMinutes","slaHighMinutes","slaNormalMinutes","slaLowMinutes","ticketNumberFormat","depreciationDefaults","qualityReportEnabled","qualityReportRecipients","qualityReportLastSentAt","workOrderCreatorTitles","workOrderTradeTitles","titleListsPersisted","checklistMasterPinSet","checklistMasterPinSetAt","persisted","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update the district facilities settings (emits FacilitiesSettingsUpdated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slaUrgentMinutes":{"type":"integer","minimum":5,"maximum":64800},"slaHighMinutes":{"type":"integer","minimum":5,"maximum":64800},"slaNormalMinutes":{"type":"integer","minimum":5,"maximum":64800},"slaLowMinutes":{"type":"integer","minimum":5,"maximum":64800},"ticketNumberFormat":{"type":"string","minLength":6,"maxLength":40,"pattern":"^[A-Z0-9-]+$"},"depreciationDefaults":{"type":"object","required":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"],"properties":{"chromebook":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"laptop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"desktop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"tablet":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"projector":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"doc_camera":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"printer":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"aed":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"musical_instrument":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"av_other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"furniture":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"phone":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"hotspot":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"keys":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"access_fob":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"id_badge":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"uniform":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"radio":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false}},"additionalProperties":false},"qualityReportEnabled":{"type":"boolean"},"qualityReportRecipients":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20},"workOrderCreatorTitles":{"type":"array","items":{"type":"string","minLength":2,"maxLength":120},"minItems":1,"maxItems":60},"workOrderTradeTitles":{"type":"array","items":{"type":"string","minLength":2,"maxLength":120},"minItems":1,"maxItems":60},"checklistMasterPin":{"type":"string","pattern":"^[0-9]{4,8}$","nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"slaUrgentMinutes":{"type":"integer"},"slaHighMinutes":{"type":"integer"},"slaNormalMinutes":{"type":"integer"},"slaLowMinutes":{"type":"integer"},"ticketNumberFormat":{"type":"string"},"depreciationDefaults":{"type":"object","required":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"],"properties":{"chromebook":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"laptop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"desktop":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"tablet":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"projector":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"doc_camera":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"printer":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"aed":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"musical_instrument":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"av_other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"furniture":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"phone":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"hotspot":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"keys":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"access_fob":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"id_badge":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"uniform":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"radio":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false},"other":{"type":"object","properties":{"months":{"type":"integer","minimum":0,"maximum":360},"salvagePct":{"type":"integer","minimum":0,"maximum":100}},"required":["months","salvagePct"],"additionalProperties":false}},"additionalProperties":false},"qualityReportEnabled":{"type":"boolean"},"qualityReportRecipients":{"type":"array","items":{"type":"string","format":"email"}},"qualityReportLastSentAt":{"type":"string","format":"date-time","nullable":true},"workOrderCreatorTitles":{"type":"array","items":{"type":"string"}},"workOrderTradeTitles":{"type":"array","items":{"type":"string"}},"titleListsPersisted":{"type":"boolean"},"checklistMasterPinSet":{"type":"boolean"},"checklistMasterPinSetAt":{"type":"string","format":"date-time","nullable":true},"persisted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["districtId","slaUrgentMinutes","slaHighMinutes","slaNormalMinutes","slaLowMinutes","ticketNumberFormat","depreciationDefaults","qualityReportEnabled","qualityReportRecipients","qualityReportLastSentAt","workOrderCreatorTitles","workOrderTradeTitles","titleListsPersisted","checklistMasterPinSet","checklistMasterPinSetAt","persisted","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/day":{"get":{"summary":"Today at a glance: entries, open tasks, pending reminders, counts","tags":["My day"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"date":{"type":"string"},"timezone":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string"},"visibility":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","location","startsAt","endsAt","allDay","timezone","visibility","sourceKind","sourceId","reminders","createdAt","updatedAt"],"additionalProperties":false}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdVia":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","status","priority","dueAt","completedAt","createdVia","sourceKind","sourceId","isOverdue","reminders","createdAt","updatedAt"],"additionalProperties":false}},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"eventId":{"type":"string","format":"uuid","nullable":true},"about":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","remindAt","channel","status","sentAt","error","taskId","eventId","about","createdAt","updatedAt"],"additionalProperties":false}},"counts":{"type":"object","properties":{"eventsToday":{"type":"integer"},"tasksOpen":{"type":"integer"},"tasksOverdue":{"type":"integer"},"tasksDueToday":{"type":"integer"},"remindersPending":{"type":"integer"}},"required":["eventsToday","tasksOpen","tasksOverdue","tasksDueToday","remindersPending"],"additionalProperties":false}},"required":["date","timezone","events","tasks","reminders","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/calendar":{"get":{"summary":"My calendar entries in a window (defaults to the next 14 days)","tags":["My day"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string"},"visibility":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","location","startsAt","endsAt","allDay","timezone","visibility","sourceKind","sourceId","reminders","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an entry to my calendar","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":5000,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":64},"visibility":{"type":"string","enum":["private","busy","shared"]},"remindMinutesBefore":{"type":"integer","minimum":0,"maximum":40320}},"required":["title","startsAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string"},"visibility":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","location","startsAt","endsAt","allDay","timezone","visibility","sourceKind","sourceId","reminders","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/calendar/{id}":{"patch":{"summary":"Change one of my calendar entries","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":5000,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":64},"visibility":{"type":"string","enum":["private","busy","shared"]},"remindMinutesBefore":{"type":"integer","minimum":0,"maximum":40320}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string"},"visibility":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","location","startsAt","endsAt","allDay","timezone","visibility","sourceKind","sourceId","reminders","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove one of my calendar entries","tags":["My day"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"timezone":{"type":"string"},"visibility":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","location","startsAt","endsAt","allDay","timezone","visibility","sourceKind","sourceId","reminders","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/tasks":{"get":{"summary":"My tasks (open only unless asked otherwise), soonest due first","tags":["My day"],"parameters":[{"schema":{"type":"string","enum":["open","done","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeDone","required":false},{"schema":{"type":"string"},"in":"query","name":"dueBefore","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdVia":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","status","priority","dueAt","completedAt","createdVia","sourceKind","sourceId","isOverdue","reminders","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a task to my list","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":5000,"nullable":true},"priority":{"type":"string","enum":["low","normal","high"]},"dueAt":{"type":"string","format":"date-time","nullable":true},"remindAt":{"type":"string","format":"date-time"}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdVia":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","status","priority","dueAt","completedAt","createdVia","sourceKind","sourceId","isOverdue","reminders","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/tasks/{id}":{"patch":{"summary":"Change one of my tasks, or tick it off","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":5000,"nullable":true},"status":{"type":"string","enum":["open","done","cancelled"]},"priority":{"type":"string","enum":["low","normal","high"]},"dueAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"dueAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"createdVia":{"type":"string"},"sourceKind":{"type":"string","nullable":true},"sourceId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"}},"required":["id","remindAt","channel","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","notes","status","priority","dueAt","completedAt","createdVia","sourceKind","sourceId","isOverdue","reminders","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove one of my tasks","tags":["My day"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/reminders":{"get":{"summary":"My reminders from now on (or the whole history with includePast)","tags":["My day"],"parameters":[{"schema":{"type":"string","enum":["pending","sent","dismissed","failed"]},"in":"query","name":"status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includePast","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"eventId":{"type":"string","format":"uuid","nullable":true},"about":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","remindAt","channel","status","sentAt","error","taskId","eventId","about","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Set a reminder, on its own or against one of my tasks or entries","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string","enum":["in_app","email","sms"]},"taskId":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["title","remindAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"eventId":{"type":"string","format":"uuid","nullable":true},"about":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","remindAt","channel","status","sentAt","error","taskId","eventId","about","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/reminders/{id}":{"patch":{"summary":"Snooze, retitle or dismiss one of my reminders","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string","enum":["in_app","email","sms"]},"status":{"type":"string","enum":["dismissed"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"remindAt":{"type":"string","format":"date-time"},"channel":{"type":"string"},"status":{"type":"string"},"sentAt":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"eventId":{"type":"string","format":"uuid","nullable":true},"about":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","remindAt","channel","status","sentAt","error","taskId","eventId","about","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove one of my reminders","tags":["My day"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/me/profile":{"get":{"summary":"My profile: the district record about me, and what I can change","tags":["My day"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"suffix":{"type":"string","nullable":true},"preferredName":{"type":"string","nullable":true},"pronouns":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phoneMobile":{"type":"string","nullable":true},"jobTitle":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["personId","firstName","middleName","lastName","suffix","preferredName","pronouns","email","phoneMobile","jobTitle","department","schools","roles"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Change my preferred name, pronouns or mobile phone","tags":["My day"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preferredName":{"type":"string","maxLength":100,"nullable":true},"pronouns":{"type":"string","maxLength":30,"nullable":true},"phoneMobile":{"type":"string","maxLength":30,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"suffix":{"type":"string","nullable":true},"preferredName":{"type":"string","nullable":true},"pronouns":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phoneMobile":{"type":"string","nullable":true},"jobTitle":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["personId","firstName","middleName","lastName","suffix","preferredName","pronouns","email","phoneMobile","jobTitle","department","schools","roles"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders":{"get":{"summary":"List work orders (board view)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"roomId","required":false},{"schema":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["low","normal","high","urgent"]},"in":"query","name":"priority","required":false},{"schema":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"assignedToPersonId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"unassigned","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"reportedByUserId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mine","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"openOnly","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"overdueOnly","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["active","done","all"]},"in":"query","name":"statusGroup","required":false},{"schema":{"type":"string","pattern":"^(school|building):[0-9a-f-]{36}$"},"in":"query","name":"site","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"openedFrom","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"openedTo","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mySchools","required":false},{"schema":{"type":"string","enum":["sla","newest","oldest","updated"],"default":"sla"},"in":"query","name":"sort","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100000},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"total":{"type":"integer"},"page":{"type":"integer"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Open a work order (emits WorkOrderOpened)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"],"default":"other"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"default":"normal"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"locationDetail":{"type":"string","maxLength":200,"nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"neededBy":{"type":"string","format":"date","nullable":true},"estimatedHours":{"type":"number","minimum":0,"maximum":99999.99,"nullable":true},"targetStartDate":{"type":"string","format":"date","nullable":true},"targetCompletionDate":{"type":"string","format":"date","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","maxLength":200,"nullable":true},"onSiteContactPhone":{"type":"string","maxLength":30,"nullable":true},"accessWindow":{"type":"string","maxLength":200,"nullable":true},"accessNotes":{"type":"string","maxLength":5000,"nullable":true},"estimatedCostCents":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","enum":["licensed_trade","specialized_equipment","warranty","capacity","code_compliance","other"],"nullable":true},"contractorVendorId":{"type":"string","format":"uuid","nullable":true},"contractorScope":{"type":"string","maxLength":5000,"nullable":true},"contractorStatus":{"type":"string","enum":["needed","quotes_requested","quote_received","approved","scheduled","on_site","completed"],"nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"contractorPoNumber":{"type":"string","maxLength":50,"nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true}},"required":["schoolId","title","description"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/sites":{"get":{"summary":"Schools and buildings to filter work orders by, with counts","tags":["Work Orders"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["school","building"]},"count":{"type":"integer"}},"required":["value","label","kind","count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/contractors":{"get":{"summary":"Active vendors that can be named as the outside contractor","tags":["Work Orders"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contactName":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["id","name","contactName","phone"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/assets":{"get":{"summary":"A school's assets, for naming the equipment a work order is about","tags":["Work Orders"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}":{"get":{"summary":"Get a work order with its full event thread","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a work order (title / description / category / priority / room / SLA)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"roomId":{"type":"string","format":"uuid","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"locationDetail":{"type":"string","maxLength":200,"nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"neededBy":{"type":"string","format":"date","nullable":true},"estimatedHours":{"type":"number","minimum":0,"maximum":99999.99,"nullable":true},"targetStartDate":{"type":"string","format":"date","nullable":true},"targetCompletionDate":{"type":"string","format":"date","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","maxLength":200,"nullable":true},"onSiteContactPhone":{"type":"string","maxLength":30,"nullable":true},"accessWindow":{"type":"string","maxLength":200,"nullable":true},"accessNotes":{"type":"string","maxLength":5000,"nullable":true},"estimatedCostCents":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","enum":["licensed_trade","specialized_equipment","warranty","capacity","code_compliance","other"],"nullable":true},"contractorVendorId":{"type":"string","format":"uuid","nullable":true},"contractorScope":{"type":"string","maxLength":5000,"nullable":true},"contractorStatus":{"type":"string","enum":["needed","quotes_requested","quote_received","approved","scheduled","on_site","completed"],"nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"contractorPoNumber":{"type":"string","maxLength":50,"nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}/assign":{"post":{"summary":"Assign or reassign the ticket (emits WorkOrderAssigned)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assignedToPersonId":{"type":"string","format":"uuid","nullable":true}},"required":["assignedToPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}/status":{"post":{"summary":"Transition ticket status (emits WorkOrderStatusChanged)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}/comments":{"post":{"summary":"Comment on a work-order thread (emits WorkOrderCommented)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}/resolve":{"post":{"summary":"Resolve a work order (emits WorkOrderResolved)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolutionNotes":{"type":"string","minLength":1,"maxLength":5000},"resolutionCostCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["resolutionNotes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{id}/cancel":{"post":{"summary":"Cancel a work order (emits WorkOrderCancelled)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["open","acknowledged","in_progress","waiting_parts","resolved","closed","cancelled"]},"reportedByUserId":{"type":"string"},"reportedByName":{"type":"string","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"siteName":{"type":"string","nullable":true},"slaDueAt":{"type":"string","format":"date-time","nullable":true},"slaRemainingMinutes":{"type":"integer","nullable":true},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"resolutionCostCents":{"type":"integer","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"locationDetail":{"type":"string","nullable":true},"assetId":{"type":"string","nullable":true},"assetName":{"type":"string","nullable":true},"neededBy":{"type":"string","nullable":true},"estimatedHours":{"type":"number","nullable":true},"targetStartDate":{"type":"string","nullable":true},"targetCompletionDate":{"type":"string","nullable":true},"safetyHazard":{"type":"boolean"},"areaOutOfService":{"type":"boolean"},"onSiteContactName":{"type":"string","nullable":true},"onSiteContactPhone":{"type":"string","nullable":true},"accessWindow":{"type":"string","nullable":true},"accessNotes":{"type":"string","nullable":true},"estimatedCostCents":{"type":"integer","nullable":true},"needsContractor":{"type":"boolean"},"contractorReason":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"contractorScope":{"type":"string","nullable":true},"contractorStatus":{"type":"string","nullable":true},"quoteRequired":{"type":"boolean"},"contractorQuoteCents":{"type":"integer","nullable":true},"contractorPoNumber":{"type":"string","nullable":true},"contractorScheduledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["created","assigned","reassigned","status_changed","commented","resolved","closed","cancelled"]},"actorUserId":{"type":"string","format":"uuid","nullable":true},"actorName":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"body":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","actorUserId","actorName","payload","body","createdAt"],"additionalProperties":false}},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","districtId","schoolId","roomId","ticketNumber","title","description","category","priority","status","reportedByUserId","reportedByName","assignedToPersonId","assignedToName","buildingId","siteName","slaDueAt","slaRemainingMinutes","acknowledgedAt","resolvedAt","closedAt","cancelledAt","cancelledReason","resolutionCostCents","resolutionNotes","locationDetail","assetId","assetName","neededBy","estimatedHours","targetStartDate","targetCompletionDate","safetyHazard","areaOutOfService","onSiteContactName","onSiteContactPhone","accessWindow","accessNotes","estimatedCostCents","needsContractor","contractorReason","contractorVendorId","contractorName","contractorScope","contractorStatus","quoteRequired","contractorQuoteCents","contractorPoNumber","contractorScheduledAt","createdAt","updatedAt","events","roomNumber","schoolName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/lookups":{"get":{"summary":"Pickers for the create and edit forms, plus the next project code","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nextCode":{"type":"string"},"capitalProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"estimatedCostCents":{"type":"integer"},"buildingId":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","nullable":true},"fundingSource":{"type":"string","nullable":true},"alreadyLinked":{"type":"boolean"}},"required":["id","code","name","estimatedCostCents","buildingId","budgetAccountId","fundingSource","alreadyLinked"],"additionalProperties":false}},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"schoolId":{"type":"string","nullable":true}},"required":["id","name","schoolId"],"additionalProperties":false}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"vendors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}},"budgetAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountCode":{"type":"string"},"description":{"type":"string"}},"required":["id","accountCode","description"],"additionalProperties":false}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["nextCode","capitalProjects","buildings","schools","vendors","budgetAccounts","staff"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects":{"get":{"summary":"List construction projects with derived cost, schedule and health","tags":["Construction"],"parameters":[{"schema":{"type":"string","enum":["planning","out_to_bid","awarded","in_progress","substantially_complete","closed","on_hold","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false},{"schema":{"type":"boolean"},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"buildingName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"architectName":{"type":"string","nullable":true},"plannedStartOn":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"substantialCompletionOn":{"type":"string","nullable":true},"actualFinishOn":{"type":"string","nullable":true},"percentComplete":{"type":"integer"},"financials":{"type":"object","properties":{"awardCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"pendingChangeCents":{"type":"integer"},"revisedContractCents":{"type":"integer"},"completedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"paidToDateCents":{"type":"integer"},"remainingCents":{"type":"integer"},"ownLaborCents":{"type":"integer"},"ownLaborHours":{"type":"number"},"costPercent":{"type":"number"},"daysExtended":{"type":"integer"},"changeOrderCount":{"type":"integer"},"changeOrderRatePct":{"type":"number"}},"required":["awardCents","approvedChangeCents","pendingChangeCents","revisedContractCents","completedToDateCents","retainageHeldCents","paidToDateCents","remainingCents","ownLaborCents","ownLaborHours","costPercent","daysExtended","changeOrderCount","changeOrderRatePct"],"additionalProperties":false},"schedule":{"type":"object","properties":{"schedulePercent":{"type":"number"},"taskCount":{"type":"integer"},"completeCount":{"type":"integer"},"overdueCount":{"type":"integer"},"slipDays":{"type":"integer"},"plannedFinishOn":{"type":"string","nullable":true},"baselineFinishOn":{"type":"string","nullable":true}},"required":["schedulePercent","taskCount","completeCount","overdueCount","slipDays","plannedFinishOn","baselineFinishOn"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["green","amber","red"]},"costVsSchedule":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["status","costVsSchedule","reasons"],"additionalProperties":false}},"required":["id","code","name","status","buildingName","schoolName","contractorName","architectName","plannedStartOn","plannedFinishOn","substantialCompletionOn","actualFinishOn","percentComplete","financials","schedule","health"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a construction project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"capitalProjectId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["planning","out_to_bid","awarded","in_progress","substantially_complete","closed","on_hold","cancelled"],"default":"planning"},"contractorVendorId":{"type":"string","format":"uuid","nullable":true},"architectVendorId":{"type":"string","format":"uuid","nullable":true},"projectManagerPersonId":{"type":"string","format":"uuid","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"contractValueCents":{"type":"integer","minimum":0,"default":0},"retainagePct":{"type":"number","minimum":0,"maximum":100,"default":0},"contractSignedOn":{"type":"string","format":"date","nullable":true},"noticeToProceedOn":{"type":"string","format":"date","nullable":true},"plannedStartOn":{"type":"string","format":"date","nullable":true},"plannedFinishOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":5000}},"required":["code","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"buildingName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"architectName":{"type":"string","nullable":true},"plannedStartOn":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"substantialCompletionOn":{"type":"string","nullable":true},"actualFinishOn":{"type":"string","nullable":true},"percentComplete":{"type":"integer"},"financials":{"type":"object","properties":{"awardCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"pendingChangeCents":{"type":"integer"},"revisedContractCents":{"type":"integer"},"completedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"paidToDateCents":{"type":"integer"},"remainingCents":{"type":"integer"},"ownLaborCents":{"type":"integer"},"ownLaborHours":{"type":"number"},"costPercent":{"type":"number"},"daysExtended":{"type":"integer"},"changeOrderCount":{"type":"integer"},"changeOrderRatePct":{"type":"number"}},"required":["awardCents","approvedChangeCents","pendingChangeCents","revisedContractCents","completedToDateCents","retainageHeldCents","paidToDateCents","remainingCents","ownLaborCents","ownLaborHours","costPercent","daysExtended","changeOrderCount","changeOrderRatePct"],"additionalProperties":false},"schedule":{"type":"object","properties":{"schedulePercent":{"type":"number"},"taskCount":{"type":"integer"},"completeCount":{"type":"integer"},"overdueCount":{"type":"integer"},"slipDays":{"type":"integer"},"plannedFinishOn":{"type":"string","nullable":true},"baselineFinishOn":{"type":"string","nullable":true}},"required":["schedulePercent","taskCount","completeCount","overdueCount","slipDays","plannedFinishOn","baselineFinishOn"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["green","amber","red"]},"costVsSchedule":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["status","costVsSchedule","reasons"],"additionalProperties":false},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"capitalProjectName":{"type":"string","nullable":true},"buildingId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"architectVendorId":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"retainagePct":{"type":"number"},"contractSignedOn":{"type":"string","nullable":true},"noticeToProceedOn":{"type":"string","nullable":true},"healthNote":{"type":"string","nullable":true},"counts":{"type":"object","properties":{"tasks":{"type":"integer"},"changeOrders":{"type":"integer"},"dailyReports":{"type":"integer"},"documents":{"type":"integer"},"contracts":{"type":"integer"},"payApplications":{"type":"integer"}},"required":["tasks","changeOrders","dailyReports","documents","contracts","payApplications"],"additionalProperties":false}},"required":["id","code","name","status","buildingName","schoolName","contractorName","architectName","plannedStartOn","plannedFinishOn","substantialCompletionOn","actualFinishOn","percentComplete","financials","schedule","health","description","notes","capitalProjectId","capitalProjectName","buildingId","schoolId","contractorVendorId","architectVendorId","budgetAccountId","budgetAccountCode","retainagePct","contractSignedOn","noticeToProceedOn","healthNote","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{id}":{"get":{"summary":"One project, with everything derived from its records","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"buildingName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"architectName":{"type":"string","nullable":true},"plannedStartOn":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"substantialCompletionOn":{"type":"string","nullable":true},"actualFinishOn":{"type":"string","nullable":true},"percentComplete":{"type":"integer"},"financials":{"type":"object","properties":{"awardCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"pendingChangeCents":{"type":"integer"},"revisedContractCents":{"type":"integer"},"completedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"paidToDateCents":{"type":"integer"},"remainingCents":{"type":"integer"},"ownLaborCents":{"type":"integer"},"ownLaborHours":{"type":"number"},"costPercent":{"type":"number"},"daysExtended":{"type":"integer"},"changeOrderCount":{"type":"integer"},"changeOrderRatePct":{"type":"number"}},"required":["awardCents","approvedChangeCents","pendingChangeCents","revisedContractCents","completedToDateCents","retainageHeldCents","paidToDateCents","remainingCents","ownLaborCents","ownLaborHours","costPercent","daysExtended","changeOrderCount","changeOrderRatePct"],"additionalProperties":false},"schedule":{"type":"object","properties":{"schedulePercent":{"type":"number"},"taskCount":{"type":"integer"},"completeCount":{"type":"integer"},"overdueCount":{"type":"integer"},"slipDays":{"type":"integer"},"plannedFinishOn":{"type":"string","nullable":true},"baselineFinishOn":{"type":"string","nullable":true}},"required":["schedulePercent","taskCount","completeCount","overdueCount","slipDays","plannedFinishOn","baselineFinishOn"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["green","amber","red"]},"costVsSchedule":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["status","costVsSchedule","reasons"],"additionalProperties":false},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"capitalProjectName":{"type":"string","nullable":true},"buildingId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"architectVendorId":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"retainagePct":{"type":"number"},"contractSignedOn":{"type":"string","nullable":true},"noticeToProceedOn":{"type":"string","nullable":true},"healthNote":{"type":"string","nullable":true},"counts":{"type":"object","properties":{"tasks":{"type":"integer"},"changeOrders":{"type":"integer"},"dailyReports":{"type":"integer"},"documents":{"type":"integer"},"contracts":{"type":"integer"},"payApplications":{"type":"integer"}},"required":["tasks","changeOrders","dailyReports","documents","contracts","payApplications"],"additionalProperties":false}},"required":["id","code","name","status","buildingName","schoolName","contractorName","architectName","plannedStartOn","plannedFinishOn","substantialCompletionOn","actualFinishOn","percentComplete","financials","schedule","health","description","notes","capitalProjectId","capitalProjectName","buildingId","schoolId","contractorVendorId","architectVendorId","budgetAccountId","budgetAccountCode","retainagePct","contractSignedOn","noticeToProceedOn","healthNote","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a construction project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"capitalProjectId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["planning","out_to_bid","awarded","in_progress","substantially_complete","closed","on_hold","cancelled"],"default":"planning"},"contractorVendorId":{"type":"string","format":"uuid","nullable":true},"architectVendorId":{"type":"string","format":"uuid","nullable":true},"projectManagerPersonId":{"type":"string","format":"uuid","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"contractValueCents":{"type":"integer","minimum":0,"default":0},"retainagePct":{"type":"number","minimum":0,"maximum":100,"default":0},"contractSignedOn":{"type":"string","format":"date","nullable":true},"noticeToProceedOn":{"type":"string","format":"date","nullable":true},"plannedStartOn":{"type":"string","format":"date","nullable":true},"plannedFinishOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":5000},"substantialCompletionOn":{"type":"string","format":"date","nullable":true},"actualFinishOn":{"type":"string","format":"date","nullable":true},"percentComplete":{"type":"integer","minimum":0,"maximum":100},"healthNote":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"buildingName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"contractorName":{"type":"string","nullable":true},"architectName":{"type":"string","nullable":true},"plannedStartOn":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"substantialCompletionOn":{"type":"string","nullable":true},"actualFinishOn":{"type":"string","nullable":true},"percentComplete":{"type":"integer"},"financials":{"type":"object","properties":{"awardCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"pendingChangeCents":{"type":"integer"},"revisedContractCents":{"type":"integer"},"completedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"paidToDateCents":{"type":"integer"},"remainingCents":{"type":"integer"},"ownLaborCents":{"type":"integer"},"ownLaborHours":{"type":"number"},"costPercent":{"type":"number"},"daysExtended":{"type":"integer"},"changeOrderCount":{"type":"integer"},"changeOrderRatePct":{"type":"number"}},"required":["awardCents","approvedChangeCents","pendingChangeCents","revisedContractCents","completedToDateCents","retainageHeldCents","paidToDateCents","remainingCents","ownLaborCents","ownLaborHours","costPercent","daysExtended","changeOrderCount","changeOrderRatePct"],"additionalProperties":false},"schedule":{"type":"object","properties":{"schedulePercent":{"type":"number"},"taskCount":{"type":"integer"},"completeCount":{"type":"integer"},"overdueCount":{"type":"integer"},"slipDays":{"type":"integer"},"plannedFinishOn":{"type":"string","nullable":true},"baselineFinishOn":{"type":"string","nullable":true}},"required":["schedulePercent","taskCount","completeCount","overdueCount","slipDays","plannedFinishOn","baselineFinishOn"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["green","amber","red"]},"costVsSchedule":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["status","costVsSchedule","reasons"],"additionalProperties":false},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"capitalProjectName":{"type":"string","nullable":true},"buildingId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"contractorVendorId":{"type":"string","nullable":true},"architectVendorId":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"retainagePct":{"type":"number"},"contractSignedOn":{"type":"string","nullable":true},"noticeToProceedOn":{"type":"string","nullable":true},"healthNote":{"type":"string","nullable":true},"counts":{"type":"object","properties":{"tasks":{"type":"integer"},"changeOrders":{"type":"integer"},"dailyReports":{"type":"integer"},"documents":{"type":"integer"},"contracts":{"type":"integer"},"payApplications":{"type":"integer"}},"required":["tasks","changeOrders","dailyReports","documents","contracts","payApplications"],"additionalProperties":false}},"required":["id","code","name","status","buildingName","schoolName","contractorName","architectName","plannedStartOn","plannedFinishOn","substantialCompletionOn","actualFinishOn","percentComplete","financials","schedule","health","description","notes","capitalProjectId","capitalProjectName","buildingId","schoolId","contractorVendorId","architectVendorId","budgetAccountId","budgetAccountCode","retainagePct","contractSignedOn","noticeToProceedOn","healthNote","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Archive a construction project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/schedule":{"get":{"summary":"The Gantt: tasks flattened depth-first, with float and the critical path","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string"},"status":{"type":"string"},"position":{"type":"integer"},"depth":{"type":"integer"},"plannedStartOn":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"baselineStartOn":{"type":"string","nullable":true},"baselineFinishOn":{"type":"string","nullable":true},"actualStartOn":{"type":"string","nullable":true},"actualFinishOn":{"type":"string","nullable":true},"percentComplete":{"type":"integer"},"isCritical":{"type":"boolean"},"slipDays":{"type":"integer","nullable":true},"floatDays":{"type":"integer","nullable":true},"assignedVendorId":{"type":"string","nullable":true},"assignedVendorName":{"type":"string","nullable":true},"assignedPersonId":{"type":"string","nullable":true},"budgetHours":{"type":"number","nullable":true},"actualHours":{"type":"number"},"predecessorIds":{"type":"array","items":{"type":"string"}}},"required":["id","parentId","name","description","kind","status","position","depth","plannedStartOn","plannedFinishOn","baselineStartOn","baselineFinishOn","actualStartOn","actualFinishOn","percentComplete","isCritical","slipDays","floatDays","assignedVendorId","assignedVendorName","assignedPersonId","budgetHours","actualHours","predecessorIds"],"additionalProperties":false}},"hasCycle":{"type":"boolean"},"projectFinishOn":{"type":"string","nullable":true}},"required":["tasks","hasCycle","projectFinishOn"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/tasks":{"post":{"summary":"Add a phase, task or milestone","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"kind":{"type":"string","enum":["phase","task","milestone"],"default":"task"},"parentId":{"type":"string","format":"uuid","nullable":true},"position":{"type":"integer","minimum":0},"plannedStartOn":{"type":"string","format":"date","nullable":true},"plannedFinishOn":{"type":"string","format":"date","nullable":true},"assignedVendorId":{"type":"string","format":"uuid","nullable":true},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"budgetHours":{"type":"number","minimum":0,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/tasks/{id}":{"patch":{"summary":"Update a schedule row","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"kind":{"type":"string","enum":["phase","task","milestone"],"default":"task"},"parentId":{"type":"string","format":"uuid","nullable":true},"position":{"type":"integer","minimum":0},"plannedStartOn":{"type":"string","format":"date","nullable":true},"plannedFinishOn":{"type":"string","format":"date","nullable":true},"assignedVendorId":{"type":"string","format":"uuid","nullable":true},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"budgetHours":{"type":"number","minimum":0,"nullable":true},"status":{"type":"string","enum":["not_started","in_progress","blocked","complete"]},"percentComplete":{"type":"integer","minimum":0,"maximum":100},"actualStartOn":{"type":"string","format":"date","nullable":true},"actualFinishOn":{"type":"string","format":"date","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a schedule row; its children are re-parented, not orphaned","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/dependencies":{"post":{"summary":"Link two tasks; a link that would close a loop is refused","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"predecessorId":{"type":"string","format":"uuid"},"successorId":{"type":"string","format":"uuid"},"linkType":{"type":"string","enum":["FS","SS","FF","SF"],"default":"FS"},"lagDays":{"type":"integer","minimum":-365,"maximum":365,"default":0}},"required":["predecessorId","successorId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Unlink two tasks","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"predecessorId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"successorId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/baseline":{"post":{"summary":"Freeze the current plan as the baseline slip is measured against","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tasksBaselined":{"type":"integer"}},"required":["tasksBaselined"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/analytics/portfolio":{"get":{"summary":"Programme totals, health mix, and the projects that need attention","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"projectCount":{"type":"integer"},"activeCount":{"type":"integer"},"byStatus":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"count":{"type":"integer"}},"required":["status","count"],"additionalProperties":false}},"byHealth":{"type":"array","items":{"type":"object","properties":{"health":{"type":"string"},"count":{"type":"integer"}},"required":["health","count"],"additionalProperties":false}},"awardCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"revisedContractCents":{"type":"integer"},"completedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"remainingCents":{"type":"integer"},"changeOrderRatePct":{"type":"number"},"weightedCostPercent":{"type":"number"},"weightedSchedulePercent":{"type":"number"},"atRisk":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"health":{"type":"string"},"costVsSchedule":{"type":"number"},"slipDays":{"type":"integer"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["id","code","name","health","costVsSchedule","slipDays","reasons"],"additionalProperties":false}}},"required":["projectCount","activeCount","byStatus","byHealth","awardCents","approvedChangeCents","revisedContractCents","completedToDateCents","retainageHeldCents","remainingCents","changeOrderRatePct","weightedCostPercent","weightedSchedulePercent","atRisk"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/analytics/spend":{"get":{"summary":"Money certified per month across the programme","tags":["Construction"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":120,"default":24},"in":"query","name":"months","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"certifiedCents":{"type":"integer"},"cumulativeCents":{"type":"integer"},"payApplications":{"type":"integer"}},"required":["month","certifiedCents","cumulativeCents","payApplications"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/analytics/completion":{"get":{"summary":"Delivery record by year, measured against the baseline","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"completed":{"type":"integer"},"onTime":{"type":"integer"},"late":{"type":"integer"},"onTimeRatePct":{"type":"number"},"medianOverrunDays":{"type":"integer"}},"required":["period","completed","onTime","late","onTimeRatePct","medianOverrunDays"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/analytics/change-orders":{"get":{"summary":"Change order volume and value by quarter","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"approvedCount":{"type":"integer"},"approvedCents":{"type":"integer"},"rejectedCount":{"type":"integer"},"daysExtended":{"type":"integer"}},"required":["period","approvedCount","approvedCents","rejectedCount","daysExtended"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/burn":{"get":{"summary":"Planned S-curve against money actually certified","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"plannedCents":{"type":"integer"},"actualCents":{"type":"integer","nullable":true}},"required":["date","plannedCents","actualCents"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/cost-breakdown":{"get":{"summary":"Estimate against actual, by labour, material, equipment and subcontract","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"estimateId":{"type":"string","nullable":true},"estimateName":{"type":"string","nullable":true},"estimateBasis":{"type":"string","nullable":true},"rows":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"label":{"type":"string"},"estimatedCents":{"type":"integer"},"actualCents":{"type":"integer"},"varianceCents":{"type":"integer"},"variancePct":{"type":"number"}},"required":["costType","label","estimatedCents","actualCents","varianceCents","variancePct"],"additionalProperties":false}},"totals":{"type":"object","properties":{"estimatedCents":{"type":"integer"},"budgetedCents":{"type":"integer"},"actualCents":{"type":"integer"},"varianceCents":{"type":"integer"},"variancePct":{"type":"number"},"contingencyCents":{"type":"integer"},"escalationCents":{"type":"integer"}},"required":["estimatedCents","budgetedCents","actualCents","varianceCents","variancePct","contingencyCents","escalationCents"],"additionalProperties":false}},"required":["estimateId","estimateName","estimateBasis","rows","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/client":{"get":{"summary":"Read-only project status for school leadership","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"buildingName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"percentComplete":{"type":"number"},"health":{"type":"string","enum":["green","amber","red"]},"healthNote":{"type":"string","nullable":true},"plannedFinishOn":{"type":"string","nullable":true},"slipDays":{"type":"integer"},"substantialCompletionOn":{"type":"string","nullable":true}},"required":["id","code","name","status","buildingName","schoolName","percentComplete","health","healthNote","plannedFinishOn","slipDays","substantialCompletionOn"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/client/{id}/contracts":{"get":{"summary":"Contracts on a project, for the district-side workspace","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contractNumber":{"type":"string"},"trade":{"type":"string"},"heldBy":{"type":"string"},"status":{"type":"string"},"vendorName":{"type":"string","nullable":true},"valueCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"revisedValueCents":{"type":"integer"},"billedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"percentBilled":{"type":"number"},"bondOnFile":{"type":"boolean"},"insuranceExpiry":{"type":"string","nullable":true},"insuranceLapsed":{"type":"boolean"}},"required":["id","contractNumber","trade","heldBy","status","vendorName","valueCents","approvedChangeCents","revisedValueCents","billedToDateCents","retainageHeldCents","percentBilled","bondOnFile","insuranceExpiry","insuranceLapsed"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/activity":{"get":{"summary":"Recent construction activity, district-wide","tags":["Construction"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"actorName":{"type":"string","nullable":true},"method":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string","nullable":true},"entityId":{"type":"string","nullable":true},"detail":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","projectId","projectCode","actorName","method","action","entityType","entityId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/activity":{"get":{"summary":"Activity log for one project","tags":["Construction"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"actorName":{"type":"string","nullable":true},"method":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string","nullable":true},"entityId":{"type":"string","nullable":true},"detail":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","projectId","projectCode","actorName","method","action","entityType","entityId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/approval-policies":{"get":{"summary":"Sign-off routing per record type","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"role":{"type":"string"},"thresholdCents":{"type":"integer","nullable":true},"thresholdPct":{"type":"number","nullable":true}},"required":["label","role"],"additionalProperties":false}}},"required":["entityType","name","isActive","steps"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/approval-policies/{entityType}":{"put":{"summary":"Set the sign-off steps for a record type","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"isActive":{"type":"boolean","default":true},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","minLength":1,"maxLength":40},"thresholdCents":{"type":"integer","minimum":0,"nullable":true},"thresholdPct":{"type":"number","minimum":0,"maximum":100,"nullable":true}},"required":["label","role"],"additionalProperties":false},"maxItems":8}},"required":["name","steps"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","enum":["change_order","pay_application","estimate","bid_award"]},"in":"path","name":"entityType","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entityType":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"role":{"type":"string"},"thresholdCents":{"type":"integer","nullable":true},"thresholdPct":{"type":"number","nullable":true}},"required":["label","role"],"additionalProperties":false}}},"required":["entityType","name","isActive","steps"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/approval-policies/seed-defaults":{"post":{"summary":"Load the default NJ sign-off routing","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"}},"required":["created"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/approvals/{entityType}/{entityId}":{"get":{"summary":"Sign-off steps for one record","tags":["Construction"],"parameters":[{"schema":{"type":"string","enum":["change_order","pay_application","estimate","bid_award"]},"in":"path","name":"entityType","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"entityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"label":{"type":"string"},"amountCents":{"type":"integer"},"createdByUserId":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"stepIndex":{"type":"integer"},"label":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"decidedByName":{"type":"string","nullable":true},"decidedAt":{"type":"string","nullable":true},"note":{"type":"string","nullable":true}},"required":["stepIndex","label","role","status","decidedByName","decidedAt","note"],"additionalProperties":false}},"complete":{"type":"boolean"}},"required":["label","amountCents","createdByUserId","steps","complete"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/approvals/{entityType}/{entityId}/steps/{stepIndex}/decide":{"post":{"summary":"Sign (or reject) one routing step","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"note":{"type":"string","maxLength":1000}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","enum":["change_order","pay_application","estimate","bid_award"]},"in":"path","name":"entityType","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"entityId","required":true},{"schema":{"type":"integer","minimum":0},"in":"path","name":"stepIndex","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stepIndex":{"type":"integer"},"label":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"decidedByName":{"type":"string","nullable":true},"decidedAt":{"type":"string","nullable":true},"note":{"type":"string","nullable":true}},"required":["stepIndex","label","role","status","decidedByName","decidedAt","note"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/approvals/pending":{"get":{"summary":"Everything waiting for a signature, district-wide","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"entityId":{"type":"string"},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"label":{"type":"string"},"amountCents":{"type":"integer"},"nextStep":{"type":"object","properties":{"stepIndex":{"type":"integer"},"label":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"decidedByName":{"type":"string","nullable":true},"decidedAt":{"type":"string","nullable":true},"note":{"type":"string","nullable":true}},"required":["stepIndex","label","role","status","decidedByName","decidedAt","note"],"additionalProperties":false},"forMe":{"type":"boolean"}},"required":["entityType","entityId","projectId","projectCode","label","amountCents","nextStep","forMe"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/compliance":{"get":{"summary":"Compliance checklist for a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"citation":{"type":"string","nullable":true},"required":{"type":"boolean"},"status":{"type":"string"},"dueOn":{"type":"string","nullable":true},"satisfiedOn":{"type":"string","nullable":true},"documentId":{"type":"string","nullable":true},"documentTitle":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"position":{"type":"integer"}},"required":["id","category","key","label","citation","required","status","dueOn","satisfiedOn","documentId","documentTitle","notes","position"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a checklist item","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","minLength":1,"maxLength":30},"label":{"type":"string","minLength":1,"maxLength":200},"citation":{"type":"string","maxLength":120},"required":{"type":"boolean","default":true},"dueOn":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":1000}},"required":["category","label"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"citation":{"type":"string","nullable":true},"required":{"type":"boolean"},"status":{"type":"string"},"dueOn":{"type":"string","nullable":true},"satisfiedOn":{"type":"string","nullable":true},"documentId":{"type":"string","nullable":true},"documentTitle":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"position":{"type":"integer"}},"required":["id","category","key","label","citation","required","status","dueOn","satisfiedOn","documentId","documentTitle","notes","position"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/compliance/seed-nj":{"post":{"summary":"Load the NJ public-works checklist onto this project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"}},"required":["created"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/compliance/{id}":{"patch":{"summary":"Update a checklist item: status, due date, evidence document, notes","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","satisfied","waived","na"]},"dueOn":{"type":"string","format":"date","nullable":true},"satisfiedOn":{"type":"string","format":"date","nullable":true},"documentId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true},"required":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"citation":{"type":"string","nullable":true},"required":{"type":"boolean"},"status":{"type":"string"},"dueOn":{"type":"string","nullable":true},"satisfiedOn":{"type":"string","nullable":true},"documentId":{"type":"string","nullable":true},"documentTitle":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"position":{"type":"integer"}},"required":["id","category","key","label","citation","required","status","dueOn","satisfiedOn","documentId","documentTitle","notes","position"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/dashboard":{"get":{"summary":"Construction Management dashboard","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/contracts":{"get":{"summary":"Every contract on a job, with what it has billed","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contractNumber":{"type":"string"},"trade":{"type":"string"},"heldBy":{"type":"string"},"status":{"type":"string"},"vendorName":{"type":"string","nullable":true},"valueCents":{"type":"integer"},"approvedChangeCents":{"type":"integer"},"revisedValueCents":{"type":"integer"},"billedToDateCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"percentBilled":{"type":"number"},"bondOnFile":{"type":"boolean"},"insuranceExpiry":{"type":"string","nullable":true},"insuranceLapsed":{"type":"boolean"}},"required":["id","contractNumber","trade","heldBy","status","vendorName","valueCents","approvedChangeCents","revisedValueCents","billedToDateCents","retainageHeldCents","percentBilled","bondOnFile","insuranceExpiry","insuranceLapsed"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Award a contract","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractNumber":{"type":"string","minLength":1,"maxLength":40},"vendorId":{"type":"string","format":"uuid","nullable":true},"trade":{"type":"string","enum":["general","plumbing","hvac","electrical","structural","site","roofing","abatement","other"],"default":"general"},"heldBy":{"type":"string","enum":["district","general_contractor"],"default":"district"},"scope":{"type":"string","maxLength":5000},"valueCents":{"type":"integer","minimum":0,"default":0},"retainagePct":{"type":"number","minimum":0,"maximum":100,"default":0},"status":{"type":"string","enum":["bidding","awarded","active","substantially_complete","closed","terminated"],"default":"awarded"},"awardedOn":{"type":"string","format":"date","nullable":true},"noticeToProceedOn":{"type":"string","format":"date","nullable":true},"bondOnFile":{"type":"boolean","default":false},"insuranceExpiry":{"type":"string","format":"date","nullable":true}},"required":["contractNumber"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/change-orders":{"get":{"summary":"Change orders on a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"integer"},"daysExtended":{"type":"integer"},"contractNumber":{"type":"string","nullable":true},"submittedOn":{"type":"string","nullable":true},"decidedOn":{"type":"string","nullable":true},"requiresBoardApproval":{"type":"boolean"},"boardApprovedOn":{"type":"string","nullable":true},"decisionNote":{"type":"string","nullable":true}},"required":["id","number","title","reason","status","amountCents","daysExtended","contractNumber","submittedOn","decidedOn","requiresBoardApproval","boardApprovedOn","decisionNote"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Raise a change order","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"reason":{"type":"string","enum":["owner_request","unforeseen_condition","design_error","code_requirement","allowance_adjustment","other"],"default":"other"},"contractId":{"type":"string","format":"uuid","nullable":true},"amountCents":{"type":"integer"},"daysExtended":{"type":"integer","minimum":0,"default":0},"number":{"type":"string","maxLength":20}},"required":["title","amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/change-orders/{id}/decide":{"post":{"summary":"Approve or reject a change order","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"note":{"type":"string","maxLength":1000},"boardApprovedOn":{"type":"string","format":"date","nullable":true}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/pay-applications":{"get":{"summary":"Applications for payment, newest first","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"contractNumber":{"type":"string","nullable":true},"periodFrom":{"type":"string"},"periodTo":{"type":"string"},"status":{"type":"string"},"workCompletedToDateCents":{"type":"integer"},"storedMaterialsCents":{"type":"integer"},"retainageHeldCents":{"type":"integer"},"thisPeriodCents":{"type":"integer"},"netDueCents":{"type":"integer"},"certifiedOn":{"type":"string","nullable":true},"paidOn":{"type":"string","nullable":true},"paymentReference":{"type":"string","nullable":true}},"required":["id","number","contractNumber","periodFrom","periodTo","status","workCompletedToDateCents","storedMaterialsCents","retainageHeldCents","thisPeriodCents","netDueCents","certifiedOn","paidOn","paymentReference"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record an application for payment","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractId":{"type":"string","format":"uuid","nullable":true},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"workCompletedToDateCents":{"type":"integer","minimum":0,"default":0},"storedMaterialsCents":{"type":"integer","minimum":0,"default":0},"notes":{"type":"string","maxLength":5000}},"required":["periodFrom","periodTo"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/pay-applications/{id}/decide":{"post":{"summary":"Certify, reject or mark an application paid","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected","paid"]},"paymentReference":{"type":"string","maxLength":50},"notes":{"type":"string","maxLength":1000}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"funding":{"type":"object","properties":{"draws":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amountCents":{"type":"integer"}},"required":["sourceId","code","name","amountCents"],"additionalProperties":false}},"drawnCents":{"type":"integer"},"shortfallCents":{"type":"integer"}},"required":["draws","drawnCents","shortfallCents"],"additionalProperties":false,"nullable":true}},"required":["id","funding"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/daily-reports":{"get":{"summary":"Daily reports, newest first","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportDate":{"type":"string"},"weather":{"type":"string","nullable":true},"temperatureF":{"type":"integer","nullable":true},"weatherDelayHours":{"type":"number","nullable":true},"crewCount":{"type":"integer","nullable":true},"laborHours":{"type":"number","nullable":true},"workPerformed":{"type":"string"},"delaysOrIssues":{"type":"string","nullable":true},"safetyIncidents":{"type":"string","nullable":true},"acknowledged":{"type":"boolean"}},"required":["id","reportDate","weather","temperatureF","weatherDelayHours","crewCount","laborHours","workPerformed","delaysOrIssues","safetyIncidents","acknowledged"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"File a daily report","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportDate":{"type":"string","format":"date"},"weather":{"type":"string","maxLength":50},"temperatureF":{"type":"integer","minimum":-60,"maximum":140,"nullable":true},"weatherDelayHours":{"type":"number","minimum":0,"maximum":24,"nullable":true},"crewCount":{"type":"integer","minimum":0,"nullable":true},"laborHours":{"type":"number","minimum":0,"nullable":true},"workPerformed":{"type":"string","minLength":1,"maxLength":20000},"equipmentOnSite":{"type":"string","maxLength":5000},"deliveries":{"type":"string","maxLength":5000},"visitors":{"type":"string","maxLength":5000},"delaysOrIssues":{"type":"string","maxLength":5000},"safetyIncidents":{"type":"string","maxLength":5000}},"required":["reportDate","workPerformed"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/daily-reports/{id}/acknowledge":{"post":{"summary":"Countersign a daily report","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/estimates":{"get":{"summary":"Estimates, newest version first","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"basis":{"type":"string"},"status":{"type":"string"},"contingencyPct":{"type":"number"},"escalationPct":{"type":"number"},"preparedBy":{"type":"string","nullable":true},"estimatedOn":{"type":"string","nullable":true},"lineCount":{"type":"integer"},"totalCents":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents"],"additionalProperties":false}}},"required":["id","version","name","basis","status","contingencyPct","escalationPct","preparedBy","estimatedOn","lineCount","totalCents","lines"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a new estimate version","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"basis":{"type":"string","enum":["conceptual","schematic","design_development","construction_documents","bid","final"],"default":"conceptual"},"contingencyPct":{"type":"number","minimum":0,"maximum":100,"default":0},"escalationPct":{"type":"number","minimum":0,"maximum":100,"default":0},"preparedBy":{"type":"string","maxLength":200},"estimatedOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":5000}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/estimates/{id}/lines":{"post":{"summary":"Add an estimate line","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["costType","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/time":{"get":{"summary":"Hours booked to a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workedOn":{"type":"string"},"hours":{"type":"number"},"workerName":{"type":"string","nullable":true},"costCode":{"type":"string","nullable":true},"taskName":{"type":"string","nullable":true},"hourlyRateCents":{"type":"integer","nullable":true},"approved":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","workedOn","hours","workerName","costCode","taskName","hourlyRateCents","approved","notes"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Book hours to a project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid","nullable":true},"workedOn":{"type":"string","format":"date"},"hours":{"type":"number","minimum":0,"maximum":24},"costCode":{"type":"string","maxLength":30,"nullable":true},"notes":{"type":"string","maxLength":500,"nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","maxLength":200,"nullable":true},"hourlyRateCents":{"type":"integer","minimum":0,"nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true}},"required":["workedOn","hours"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/time/{id}/approve":{"post":{"summary":"Approve booked hours so they count against the job","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/costs":{"get":{"summary":"Direct costs booked to a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"incurredOn":{"type":"string"},"description":{"type":"string"},"amountCents":{"type":"integer"},"vendorName":{"type":"string","nullable":true},"invoiceRef":{"type":"string","nullable":true},"csiDivision":{"type":"string","nullable":true},"approved":{"type":"boolean"}},"required":["id","costType","incurredOn","description","amountCents","vendorName","invoiceRef","csiDivision","approved"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Book a direct cost","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"incurredOn":{"type":"string","format":"date"},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"amountCents":{"type":"integer"},"vendorId":{"type":"string","format":"uuid","nullable":true},"contractId":{"type":"string","format":"uuid","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true},"invoiceRef":{"type":"string","maxLength":60,"nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true}},"required":["costType","incurredOn","description","amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/stakeholders":{"get":{"summary":"Who on the district side follows this project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"emailUpdates":{"type":"boolean"}},"required":["id","personId","name","role","emailUpdates"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a stakeholder to a project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["principal","superintendent","business_administrator","board_member","facilities","other"],"default":"other"},"emailUpdates":{"type":"boolean","default":true}},"required":["personId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/estimates":{"get":{"summary":"All estimates — per project and standalone","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"projectId","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"standalone","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"basis":{"type":"string"},"status":{"type":"string"},"contingencyPct":{"type":"number"},"escalationPct":{"type":"number"},"preparedBy":{"type":"string","nullable":true},"estimatedOn":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"sourceEstimateId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"projectName":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"lineCount":{"type":"integer"},"subtotalCents":{"type":"integer"},"contingencyCents":{"type":"integer"},"escalationCents":{"type":"integer"},"totalCents":{"type":"integer"},"byCostType":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"cents":{"type":"integer"}},"required":["costType","cents"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","version","name","basis","status","contingencyPct","escalationPct","preparedBy","estimatedOn","notes","changeNote","approvedAt","sourceEstimateId","projectId","projectCode","projectName","subject","schoolId","schoolName","workOrderId","capitalProjectId","lineCount","subtotalCents","contingencyCents","escalationCents","totalCents","byCostType","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a standalone estimate (no project yet)","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"basis":{"type":"string","enum":["conceptual","schematic","design_development","construction_documents","bid","final"],"default":"conceptual"},"contingencyPct":{"type":"number","minimum":0,"maximum":100,"default":0},"escalationPct":{"type":"number","minimum":0,"maximum":100,"default":0},"preparedBy":{"type":"string","maxLength":200},"estimatedOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":5000},"subject":{"type":"string","minLength":1,"maxLength":200},"schoolId":{"type":"string","format":"uuid","nullable":true},"workOrderId":{"type":"string","format":"uuid","nullable":true},"capitalProjectId":{"type":"string","format":"uuid","nullable":true}},"required":["name","subject"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}":{"get":{"summary":"One estimate with lines and totals","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"basis":{"type":"string"},"status":{"type":"string"},"contingencyPct":{"type":"number"},"escalationPct":{"type":"number"},"preparedBy":{"type":"string","nullable":true},"estimatedOn":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"sourceEstimateId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"projectName":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"lineCount":{"type":"integer"},"subtotalCents":{"type":"integer"},"contingencyCents":{"type":"integer"},"escalationCents":{"type":"integer"},"totalCents":{"type":"integer"},"byCostType":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"cents":{"type":"integer"}},"required":["costType","cents"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","version","name","basis","status","contingencyPct","escalationPct","preparedBy","estimatedOn","notes","changeNote","approvedAt","sourceEstimateId","projectId","projectCode","projectName","subject","schoolId","schoolName","workOrderId","capitalProjectId","lineCount","subtotalCents","contingencyCents","escalationCents","totalCents","byCostType","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit estimate header (draft only, except notes and change note)","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"basis":{"type":"string","enum":["conceptual","schematic","design_development","construction_documents","bid","final"],"default":"conceptual"},"contingencyPct":{"type":"number","minimum":0,"maximum":100,"default":0},"escalationPct":{"type":"number","minimum":0,"maximum":100,"default":0},"preparedBy":{"type":"string","maxLength":200},"estimatedOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":5000},"subject":{"type":"string","maxLength":200,"nullable":true},"changeNote":{"type":"string","maxLength":5000,"nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"basis":{"type":"string"},"status":{"type":"string"},"contingencyPct":{"type":"number"},"escalationPct":{"type":"number"},"preparedBy":{"type":"string","nullable":true},"estimatedOn":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"sourceEstimateId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"projectName":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"lineCount":{"type":"integer"},"subtotalCents":{"type":"integer"},"contingencyCents":{"type":"integer"},"escalationCents":{"type":"integer"},"totalCents":{"type":"integer"},"byCostType":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"cents":{"type":"integer"}},"required":["costType","cents"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","version","name","basis","status","contingencyPct","escalationPct","preparedBy","estimatedOn","notes","changeNote","approvedAt","sourceEstimateId","projectId","projectCode","projectName","subject","schoolId","schoolName","workOrderId","capitalProjectId","lineCount","subtotalCents","contingencyCents","escalationCents","totalCents","byCostType","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a draft estimate","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/convert-to-project":{"post":{"summary":"Turn a standalone estimate into a construction project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","maxLength":30},"plannedStartOn":{"type":"string","format":"date"},"plannedFinishOn":{"type":"string","format":"date"}},"required":["code"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"projectId":{"type":"string"},"estimateId":{"type":"string"}},"required":["projectId","estimateId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/approve":{"post":{"summary":"Approve an estimate as the current basis; earlier approved versions become superseded","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"basis":{"type":"string"},"status":{"type":"string"},"contingencyPct":{"type":"number"},"escalationPct":{"type":"number"},"preparedBy":{"type":"string","nullable":true},"estimatedOn":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"sourceEstimateId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectCode":{"type":"string","nullable":true},"projectName":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"capitalProjectId":{"type":"string","nullable":true},"lineCount":{"type":"integer"},"subtotalCents":{"type":"integer"},"contingencyCents":{"type":"integer"},"escalationCents":{"type":"integer"},"totalCents":{"type":"integer"},"byCostType":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"cents":{"type":"integer"}},"required":["costType","cents"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","version","name","basis","status","contingencyPct","escalationPct","preparedBy","estimatedOn","notes","changeNote","approvedAt","sourceEstimateId","projectId","projectCode","projectName","subject","schoolId","schoolName","workOrderId","capitalProjectId","lineCount","subtotalCents","contingencyCents","escalationCents","totalCents","byCostType","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/revise":{"post":{"summary":"Start the next version from this one, carrying every line, with a note saying why","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"changeNote":{"type":"string","minLength":3,"maxLength":5000},"basis":{"type":"string","enum":["conceptual","schematic","design_development","construction_documents","bid","final"]},"name":{"type":"string","maxLength":200}},"required":["changeNote"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/compare":{"get":{"summary":"Line-by-line difference between two versions","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"to","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"totalCents":{"type":"integer"},"changeNote":{"type":"string","nullable":true}},"required":["id","version","name","status","totalCents","changeNote"],"additionalProperties":false},"to":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"},"totalCents":{"type":"integer"},"changeNote":{"type":"string","nullable":true}},"required":["id","version","name","status","totalCents","changeNote"],"additionalProperties":false},"added":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false}},"changed":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"from":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false},"to":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false},"deltaCents":{"type":"integer"}},"required":["description","costType","csiDivision","from","to","deltaCents"],"additionalProperties":false}},"unchangedCount":{"type":"integer"},"deltaCents":{"type":"integer"},"deltaPct":{"type":"number","nullable":true},"byCostType":{"type":"array","items":{"type":"object","properties":{"costType":{"type":"string"},"fromCents":{"type":"integer"},"toCents":{"type":"integer"},"deltaCents":{"type":"integer"}},"required":["costType","fromCents","toCents","deltaCents"],"additionalProperties":false}}},"required":["from","to","added","removed","changed","unchangedCount","deltaCents","deltaPct","byCostType"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/lines":{"post":{"summary":"Add a line","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["costType","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/lines/{lineId}":{"patch":{"summary":"Edit a line","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"lineId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"description":{"type":"string"},"quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"totalCents":{"type":"integer"},"position":{"type":"integer"},"notes":{"type":"string","nullable":true},"costItemId":{"type":"string","nullable":true}},"required":["id","costType","csiDivision","description","quantity","unit","unitCostCents","totalCents","position","notes","costItemId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a line","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"lineId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/lines/from-library":{"post":{"summary":"Add a line priced from the cost library","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costItemId":{"type":"string","format":"uuid"},"quantity":{"type":"number","exclusiveMinimum":true,"minimum":0},"notes":{"type":"string","maxLength":500}},"required":["costItemId","quantity"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/lines/from-assembly":{"post":{"summary":"Expand an assembly into lines","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assemblyId":{"type":"string","format":"uuid"},"quantity":{"type":"number","exclusiveMinimum":true,"minimum":0}},"required":["assemblyId","quantity"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"}},"required":["created"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/estimates/{id}/export.pdf":{"get":{"summary":"Estimate as a PDF for the board packet","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/cost-items":{"get":{"summary":"District cost library","tags":["Construction"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string"},"in":"query","name":"costType","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"laborHoursPerUnit":{"type":"number","nullable":true},"source":{"type":"string"},"effectiveOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","code","description","costType","csiDivision","unit","unitCostCents","laborHoursPerUnit","source","effectiveOn","isActive","notes"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a library item","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"description":{"type":"string","minLength":1,"maxLength":300},"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"unit":{"type":"string","minLength":1,"maxLength":20},"unitCostCents":{"type":"integer","minimum":0},"laborHoursPerUnit":{"type":"number","minimum":0,"nullable":true},"source":{"type":"string","enum":["rsmeans","district","vendor","bid","prevailing_wage"],"default":"district"},"effectiveOn":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["code","description","costType","unit","unitCostCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"laborHoursPerUnit":{"type":"number","nullable":true},"source":{"type":"string"},"effectiveOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","code","description","costType","csiDivision","unit","unitCostCents","laborHoursPerUnit","source","effectiveOn","isActive","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/cost-items/{id}":{"patch":{"summary":"Update a library item (existing estimate lines keep their price)","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"description":{"type":"string","minLength":1,"maxLength":300},"costType":{"type":"string","enum":["labor","material","equipment","subcontract","other"]},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"unit":{"type":"string","minLength":1,"maxLength":20},"unitCostCents":{"type":"integer","minimum":0},"laborHoursPerUnit":{"type":"number","minimum":0,"nullable":true},"source":{"type":"string","enum":["rsmeans","district","vendor","bid","prevailing_wage"],"default":"district"},"effectiveOn":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"laborHoursPerUnit":{"type":"number","nullable":true},"source":{"type":"string"},"effectiveOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true}},"required":["id","code","description","costType","csiDivision","unit","unitCostCents","laborHoursPerUnit","source","effectiveOn","isActive","notes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/cost-assemblies":{"get":{"summary":"Assemblies (bundles of library items per unit of work)","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"unit":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"unitCostCents":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costItemId":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"quantityPerUnit":{"type":"number"}},"required":["id","costItemId","code","description","costType","unit","unitCostCents","quantityPerUnit"],"additionalProperties":false}}},"required":["id","code","name","description","unit","csiDivision","isActive","unitCostCents","items"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an assembly","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500,"nullable":true},"unit":{"type":"string","minLength":1,"maxLength":20},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"isActive":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"costItemId":{"type":"string","format":"uuid"},"quantityPerUnit":{"type":"number","exclusiveMinimum":true,"minimum":0}},"required":["costItemId","quantityPerUnit"],"additionalProperties":false},"minItems":1,"maxItems":60}},"required":["code","name","unit","items"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"unit":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"unitCostCents":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costItemId":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"quantityPerUnit":{"type":"number"}},"required":["id","costItemId","code","description","costType","unit","unitCostCents","quantityPerUnit"],"additionalProperties":false}}},"required":["id","code","name","description","unit","csiDivision","isActive","unitCostCents","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/cost-assemblies/{id}":{"put":{"summary":"Replace an assembly definition","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500,"nullable":true},"unit":{"type":"string","minLength":1,"maxLength":20},"csiDivision":{"type":"string","maxLength":10,"nullable":true},"isActive":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"costItemId":{"type":"string","format":"uuid"},"quantityPerUnit":{"type":"number","exclusiveMinimum":true,"minimum":0}},"required":["costItemId","quantityPerUnit"],"additionalProperties":false},"minItems":1,"maxItems":60}},"required":["code","name","unit","items"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"unit":{"type":"string"},"csiDivision":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"unitCostCents":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costItemId":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"costType":{"type":"string"},"unit":{"type":"string"},"unitCostCents":{"type":"integer"},"quantityPerUnit":{"type":"number"}},"required":["id","costItemId","code","description","costType","unit","unitCostCents","quantityPerUnit"],"additionalProperties":false}}},"required":["id","code","name","description","unit","csiDivision","isActive","unitCostCents","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/documents":{"get":{"summary":"Documents on a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"version":{"type":"integer"},"clientVisible":{"type":"boolean"},"description":{"type":"string","nullable":true},"uploadedAt":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","category","title","filename","mimeType","sizeBytes","version","clientVisible","description","uploadedAt","isCurrent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Upload a document (multipart/form-data)","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"}},"required":["id","version"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/client/{projectId}/documents":{"get":{"summary":"Documents a project has shared with school leadership","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"version":{"type":"integer"},"clientVisible":{"type":"boolean"},"description":{"type":"string","nullable":true},"uploadedAt":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","category","title","filename","mimeType","sizeBytes","version","clientVisible","description","uploadedAt","isCurrent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/documents/{id}/download":{"get":{"summary":"Download a document","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/construction/documents/{id}":{"delete":{"summary":"Remove a document","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/bid-packages":{"get":{"summary":"Bid packages on a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"trade":{"type":"string"},"status":{"type":"string"},"engineerEstimateCents":{"type":"integer"},"advertisedOn":{"type":"string","nullable":true},"bidDueAt":{"type":"string","nullable":true},"openedAt":{"type":"string","nullable":true},"bidderCount":{"type":"integer"},"addendaCount":{"type":"integer"},"boardAwardedOn":{"type":"string","nullable":true}},"required":["id","number","title","trade","status","engineerEstimateCents","advertisedOn","bidDueAt","openedAt","bidderCount","addendaCount","boardAwardedOn"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a bid package","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":30},"title":{"type":"string","minLength":1,"maxLength":200},"trade":{"type":"string","enum":["general","plumbing","hvac","electrical","structural","site","roofing","abatement","other"],"default":"general"},"scope":{"type":"string","maxLength":5000},"engineerEstimateCents":{"type":"integer","minimum":0,"default":0},"advertisedOn":{"type":"string","format":"date","nullable":true},"preBidAt":{"type":"string","format":"date-time","nullable":true},"preBidMandatory":{"type":"boolean","default":false},"questionsDueOn":{"type":"string","format":"date","nullable":true},"bidDueAt":{"type":"string","format":"date-time","nullable":true},"bidSecurityPct":{"type":"number","minimum":0,"maximum":100,"default":10},"prevailingWage":{"type":"boolean","default":true},"dpmcPrequalRequired":{"type":"boolean","default":true}},"required":["number","title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/tabulation":{"get":{"summary":"The bid tab, with responsiveness evaluated against N.J.S.A. 18A:18A","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"packageId":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"trade":{"type":"string"},"status":{"type":"string"},"engineerEstimateCents":{"type":"integer"},"bidDueAt":{"type":"string","nullable":true},"openedAt":{"type":"string","nullable":true},"addendaIssued":{"type":"integer"},"alternates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"description":{"type":"string"},"accepted":{"type":"boolean"}},"required":["id","number","description","accepted"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"bidderId":{"type":"string"},"name":{"type":"string"},"vendorId":{"type":"string","nullable":true},"status":{"type":"string"},"baseBidCents":{"type":"integer"},"alternatesCents":{"type":"integer"},"evaluatedCents":{"type":"integer"},"variancePct":{"type":"number","nullable":true},"responsive":{"type":"boolean"},"materialDefects":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"mandatory":{"type":"boolean"},"citation":{"type":"string"}},"required":["code","label","mandatory","citation"],"additionalProperties":false}},"curableDefects":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"mandatory":{"type":"boolean"},"citation":{"type":"string"}},"required":["code","label","mandatory","citation"],"additionalProperties":false}},"rank":{"type":"integer","nullable":true},"isApparentLow":{"type":"boolean"},"alternatePrices":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["bidderId","name","vendorId","status","baseBidCents","alternatesCents","evaluatedCents","variancePct","responsive","materialDefects","curableDefects","rank","isApparentLow","alternatePrices"],"additionalProperties":false}},"apparentLowBidderId":{"type":"string","nullable":true},"lowVsEstimatePct":{"type":"number","nullable":true},"allOverEstimate":{"type":"boolean"}},"required":["packageId","number","title","trade","status","engineerEstimateCents","bidDueAt","openedAt","addendaIssued","alternates","rows","apparentLowBidderId","lowVsEstimatePct","allOverEstimate"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/addenda":{"post":{"summary":"Issue an addendum","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuedOn":{"type":"string","format":"date"},"description":{"type":"string","minLength":1,"maxLength":20000},"changesScope":{"type":"boolean","default":false}},"required":["issuedOn","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/alternates":{"post":{"summary":"Add a bid alternate","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500}},"required":["description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/alternates/{id}":{"patch":{"summary":"Accept or drop an alternate, which changes who is low","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"}},"required":["accepted"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/open":{"post":{"summary":"Record the public bid opening","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/bidders":{"post":{"summary":"Record a bid received","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"vendorId":{"type":"string","format":"uuid","nullable":true},"contactName":{"type":"string","maxLength":200,"nullable":true},"email":{"type":"string","maxLength":320,"nullable":true},"baseBidCents":{"type":"integer","minimum":0,"default":0},"bidGuaranteeReceived":{"type":"boolean","default":false},"consentOfSuretyReceived":{"type":"boolean","default":false},"ownershipDisclosure":{"type":"boolean","default":false},"subcontractorListing":{"type":"boolean","default":false},"businessRegistrationCert":{"type":"boolean","default":false},"publicWorksRegistration":{"type":"boolean","default":false},"affirmativeActionEvidence":{"type":"boolean","default":false},"payToPlayDisclosure":{"type":"boolean","default":false},"dpmcPrequalified":{"type":"boolean","default":false},"attendedPreBid":{"type":"boolean","default":false},"addendaAcknowledged":{"type":"integer","minimum":0,"default":0},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/bidders/{id}":{"patch":{"summary":"Update a bid — compliance items, price, or rejection","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"baseBidCents":{"type":"integer","minimum":0},"bidGuaranteeReceived":{"type":"boolean"},"consentOfSuretyReceived":{"type":"boolean"},"ownershipDisclosure":{"type":"boolean"},"subcontractorListing":{"type":"boolean"},"businessRegistrationCert":{"type":"boolean"},"publicWorksRegistration":{"type":"boolean"},"affirmativeActionEvidence":{"type":"boolean"},"payToPlayDisclosure":{"type":"boolean"},"dpmcPrequalified":{"type":"boolean"},"attendedPreBid":{"type":"boolean"},"addendaAcknowledged":{"type":"integer","minimum":0},"status":{"type":"string","enum":["submitted","withdrawn","rejected"]},"rejectionReason":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/bidders/{id}/alternates":{"put":{"summary":"Set a bidder's alternate prices","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prices":{"type":"array","items":{"type":"object","properties":{"alternateId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"}},"required":["alternateId","amountCents"],"additionalProperties":false}}},"required":["prices"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/bid-packages/{packageId}/award":{"post":{"summary":"Award to the lowest responsible bidder, creating the contract","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bidderId":{"type":"string","format":"uuid"},"boardAwardedOn":{"type":"string","format":"date"},"resolution":{"type":"string","maxLength":60,"nullable":true},"contractNumber":{"type":"string","minLength":1,"maxLength":40},"retainagePct":{"type":"number","minimum":0,"maximum":100,"default":2}},"required":["bidderId","boardAwardedOn","contractNumber"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"packageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contractId":{"type":"string"},"contractNumber":{"type":"string"},"valueCents":{"type":"integer"},"bidderName":{"type":"string"}},"required":["contractId","contractNumber","valueCents","bidderName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/funding-sources":{"get":{"summary":"Every funding source, with what is authorised, allocated, drawn and claimed","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string"},"typeLabel":{"type":"string"},"status":{"type":"string"},"authorizedCents":{"type":"integer"},"allocatedCents":{"type":"integer"},"drawnCents":{"type":"integer"},"remainingCents":{"type":"integer"},"committedCents":{"type":"integer"},"overAllocatedCents":{"type":"integer"},"expiresOn":{"type":"string","nullable":true},"daysToExpiry":{"type":"integer","nullable":true},"expiringSoon":{"type":"boolean"},"expired":{"type":"boolean"},"stateProjectNumber":{"type":"string","nullable":true},"stateSharePct":{"type":"number","nullable":true},"reimbursable":{"type":"boolean"},"unclaimedCents":{"type":"integer"},"claimedCents":{"type":"integer"},"receivedCents":{"type":"integer"},"projectCount":{"type":"integer"}},"required":["id","code","name","sourceType","typeLabel","status","authorizedCents","allocatedCents","drawnCents","remainingCents","committedCents","overAllocatedCents","expiresOn","daysToExpiry","expiringSoon","expired","stateProjectNumber","stateSharePct","reimbursable","unclaimedCents","claimedCents","receivedCents","projectCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a funding source","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","minLength":1,"maxLength":200},"sourceType":{"type":"string","enum":["referendum_bond","sda_grant","rod_grant","capital_reserve","general_fund","debt_service_aid","esser","insurance","donation","other"]},"authorizedAmountCents":{"type":"integer","minimum":0,"default":0},"authorizedOn":{"type":"string","format":"date","nullable":true},"expiresOn":{"type":"string","format":"date","nullable":true},"stateProjectNumber":{"type":"string","maxLength":40,"nullable":true},"stateSharePct":{"type":"number","minimum":0,"maximum":100,"nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000}},"required":["code","name","sourceType"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/funding":{"get":{"summary":"How a project is funded, and how much of each source it has drawn","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fundingSourceId":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"typeLabel":{"type":"string"},"drawOrder":{"type":"integer"},"allocatedCents":{"type":"integer"},"drawnCents":{"type":"integer"},"remainingCents":{"type":"integer"},"expiresOn":{"type":"string","nullable":true},"expiringSoon":{"type":"boolean"},"reimbursable":{"type":"boolean"}},"required":["id","fundingSourceId","code","name","typeLabel","drawOrder","allocatedCents","drawnCents","remainingCents","expiresOn","expiringSoon","reimbursable"],"additionalProperties":false}},"allocatedCents":{"type":"integer"},"drawnCents":{"type":"integer"},"remainingCents":{"type":"integer"},"unfundedCents":{"type":"integer"},"contractCents":{"type":"integer"}},"required":["rows","allocatedCents","drawnCents","remainingCents","unfundedCents","contractCents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Allocate a source to a project","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fundingSourceId":{"type":"string","format":"uuid"},"allocatedCents":{"type":"integer","minimum":0},"drawOrder":{"type":"integer","minimum":0},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["fundingSourceId","allocatedCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/draws":{"get":{"summary":"Every draw against this project, newest first","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"drawnOn":{"type":"string"},"amountCents":{"type":"integer"},"description":{"type":"string"},"sourceCode":{"type":"string"},"sourceName":{"type":"string"},"reimbursable":{"type":"boolean"},"claimedOn":{"type":"string","nullable":true},"reimbursedCents":{"type":"integer","nullable":true},"reimbursementReceivedOn":{"type":"string","nullable":true}},"required":["id","drawnOn","amountCents","description","sourceCode","sourceName","reimbursable","claimedOn","reimbursedCents","reimbursementReceivedOn"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Draw an amount, spread across the sources in draw order","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","minimum":1},"drawnOn":{"type":"string","format":"date"},"description":{"type":"string","minLength":1,"maxLength":300}},"required":["amountCents","drawnOn","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draws":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amountCents":{"type":"integer"}},"required":["sourceId","code","name","amountCents"],"additionalProperties":false}},"drawnCents":{"type":"integer"},"shortfallCents":{"type":"integer"}},"required":["draws","drawnCents","shortfallCents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/funding-sources/{id}/claim":{"post":{"summary":"Claim drawn amounts back from the state","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"drawIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"claimedOn":{"type":"string","format":"date"}},"required":["drawIds","claimedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimed":{"type":"integer"},"claimCents":{"type":"integer"}},"required":["claimed","claimCents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/my-work":{"get":{"summary":"Everything waiting on somebody, across every live project","tags":["Construction"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["action","rfi","submittal","change_order","pay_application","daily_report"]},"id":{"type":"string"},"projectId":{"type":"string"},"projectCode":{"type":"string"},"projectName":{"type":"string"},"title":{"type":"string"},"ballInCourt":{"type":"string"},"assignee":{"type":"string","nullable":true},"dueOn":{"type":"string","nullable":true},"daysOpen":{"type":"integer"},"daysUntilDue":{"type":"integer","nullable":true},"overdue":{"type":"boolean"},"priority":{"type":"string"},"href":{"type":"string"}},"required":["kind","id","projectId","projectCode","projectName","title","ballInCourt","assignee","dueOn","daysOpen","daysUntilDue","overdue","priority","href"],"additionalProperties":false}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"overdue":{"type":"integer"},"mine":{"type":"integer"},"districtBall":{"type":"integer"}},"required":["total","overdue","mine","districtBall"],"additionalProperties":false}},"required":["items","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/action-items":{"get":{"summary":"Action items on a project","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string"},"priority":{"type":"string"},"ballInCourt":{"type":"string"},"assignee":{"type":"string","nullable":true},"dueOn":{"type":"string","nullable":true},"status":{"type":"string"},"overdue":{"type":"boolean"},"daysOpen":{"type":"integer"},"closedOn":{"type":"string","nullable":true},"resolution":{"type":"string","nullable":true}},"required":["id","title","description","category","priority","ballInCourt","assignee","dueOn","status","overdue","daysOpen","closedOn","resolution"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Raise an action item","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000},"category":{"type":"string","enum":["punch","safety","coordination","procurement","inspection","other"],"default":"other"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"default":"normal"},"ballInCourt":{"type":"string","enum":["district","contractor","architect","owner_rep","other"],"default":"district"},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedTo":{"type":"string","maxLength":200,"nullable":true},"dueOn":{"type":"string","format":"date","nullable":true},"taskId":{"type":"string","format":"uuid","nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/action-items/{id}":{"patch":{"summary":"Update or close an action item","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":300},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"ballInCourt":{"type":"string","enum":["district","contractor","architect","owner_rep","other"]},"assignedPersonId":{"type":"string","format":"uuid","nullable":true},"assignedTo":{"type":"string","maxLength":200,"nullable":true},"dueOn":{"type":"string","format":"date","nullable":true},"status":{"type":"string","enum":["open","in_progress","blocked","done","void"]},"resolution":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/rfis":{"get":{"summary":"The RFI log","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"ballInCourt":{"type":"string"},"submittedBy":{"type":"string"},"submittedOn":{"type":"string"},"dueOn":{"type":"string","nullable":true},"daysOpen":{"type":"integer"},"overdue":{"type":"boolean"},"closedOn":{"type":"string","nullable":true},"extra":{"type":"object","additionalProperties":{}}},"required":["id","number","title","status","ballInCourt","submittedBy","submittedOn","dueOn","daysOpen","overdue","closedOn","extra"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Log an RFI","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","maxLength":20},"subject":{"type":"string","minLength":1,"maxLength":300},"question":{"type":"string","minLength":1,"maxLength":20000},"reference":{"type":"string","maxLength":100,"nullable":true},"submittedBy":{"type":"string","minLength":1,"maxLength":200},"submittedOn":{"type":"string","format":"date"},"responseDueOn":{"type":"string","format":"date","nullable":true},"contractId":{"type":"string","format":"uuid","nullable":true},"ballInCourt":{"type":"string","enum":["district","contractor","architect","owner_rep","other"],"default":"architect"}},"required":["subject","question","submittedBy","submittedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/rfis/{id}/answer":{"post":{"summary":"Answer an RFI, recording whether it moved money or time","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","minLength":1,"maxLength":20000},"answeredBy":{"type":"string","minLength":1,"maxLength":200},"answeredOn":{"type":"string","format":"date"},"costImpact":{"type":"boolean","default":false},"scheduleImpactDays":{"type":"integer","minimum":0,"default":0}},"required":["answer","answeredBy","answeredOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/submittals":{"get":{"summary":"The submittal log","tags":["Construction"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"ballInCourt":{"type":"string"},"submittedBy":{"type":"string"},"submittedOn":{"type":"string"},"dueOn":{"type":"string","nullable":true},"daysOpen":{"type":"integer"},"overdue":{"type":"boolean"},"closedOn":{"type":"string","nullable":true},"extra":{"type":"object","additionalProperties":{}}},"required":["id","number","title","status","ballInCourt","submittedBy","submittedOn","dueOn","daysOpen","overdue","closedOn","extra"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Log a submittal, or a resubmission of one","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":20},"revision":{"type":"integer","minimum":0,"default":0},"specSection":{"type":"string","maxLength":30,"nullable":true},"title":{"type":"string","minLength":1,"maxLength":300},"submittalType":{"type":"string","enum":["shop_drawing","product_data","sample","mockup","om_manual","warranty","other"],"default":"shop_drawing"},"submittedBy":{"type":"string","minLength":1,"maxLength":200},"submittedOn":{"type":"string","format":"date"},"reviewDueOn":{"type":"string","format":"date","nullable":true},"leadTimeWeeks":{"type":"integer","minimum":0,"nullable":true},"contractId":{"type":"string","format":"uuid","nullable":true}},"required":["number","title","submittedBy","submittedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/construction/projects/{projectId}/submittals/{id}/review":{"post":{"summary":"Return a submittal with a review action","tags":["Construction"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reviewAction":{"type":"string","enum":["approved","approved_as_noted","revise_and_resubmit","rejected","for_record"]},"reviewedBy":{"type":"string","minLength":1,"maxLength":200},"reviewedOn":{"type":"string","format":"date"},"comments":{"type":"string","maxLength":20000,"nullable":true}},"required":["reviewAction","reviewedBy","reviewedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets":{"get":{"summary":"List assets","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"roomId","required":false},{"schema":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"assignedToPersonId","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRetired","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Register a new asset (emits AssetRegistered)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"tag":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"],"default":"other"},"manufacturer":{"type":"string","maxLength":100},"model":{"type":"string","maxLength":100},"serialNumber":{"type":"string","maxLength":100},"acquiredOn":{"type":"string","format":"date"},"purchaseCostCents":{"type":"integer","minimum":0,"maximum":1000000000},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"],"default":"good"},"depreciationMethod":{"type":"string","enum":["straight_line","none"],"default":"none"},"depreciationStartDate":{"type":"string","format":"date"},"usefulLifeMonths":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":360},"salvageValueCents":{"type":"integer","minimum":0,"maximum":1000000000},"warrantyExpiresOn":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":2000}},"required":["schoolId","tag","name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/reports/depreciation":{"get":{"summary":"Roll-up of book value by asset category","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"asOf":{"type":"string","format":"date-time"},"schoolId":{"type":"string","format":"uuid","nullable":true},"rows":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"assetCount":{"type":"integer","minimum":0},"totalPurchaseCents":{"type":"integer","minimum":0},"totalBookValueCents":{"type":"integer","minimum":0},"depreciatedCents":{"type":"integer"}},"required":["category","assetCount","totalPurchaseCents","totalBookValueCents","depreciatedCents"],"additionalProperties":false}},"totals":{"type":"object","properties":{"assetCount":{"type":"integer","minimum":0},"totalPurchaseCents":{"type":"integer","minimum":0},"totalBookValueCents":{"type":"integer","minimum":0},"depreciatedCents":{"type":"integer"}},"required":["assetCount","totalPurchaseCents","totalBookValueCents","depreciatedCents"],"additionalProperties":false}},"required":["asOf","schoolId","rows","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}":{"get":{"summary":"Get an asset with its adjustment history","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit an asset","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"manufacturer":{"type":"string","maxLength":100,"nullable":true},"model":{"type":"string","maxLength":100,"nullable":true},"serialNumber":{"type":"string","maxLength":100,"nullable":true},"purchaseCostCents":{"type":"integer","minimum":0,"maximum":1000000000,"nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":360,"nullable":true},"salvageValueCents":{"type":"integer","minimum":0,"maximum":1000000000,"nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}/move":{"post":{"summary":"Move an asset between rooms (emits AssetMoved)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toRoomId":{"type":"string","format":"uuid","nullable":true}},"required":["toRoomId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}/assign":{"post":{"summary":"Assign / unassign custody of an asset (emits AssetAssigned)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toPersonId":{"type":"string","format":"uuid","nullable":true}},"required":["toPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}/status":{"post":{"summary":"Change asset status (emits AssetStatusChanged)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"reason":{"type":"string","maxLength":500}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}/revalue":{"post":{"summary":"Apply a valuation adjustment (write-down, revaluation, etc.)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"appliedOn":{"type":"string","format":"date"}},"required":["deltaCents","reasonCode","reason","appliedOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assets/{id}/retire":{"post":{"summary":"Retire an asset (soft-delete, emits AssetRetired)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid","nullable":true},"tag":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["chromebook","laptop","desktop","tablet","projector","doc_camera","printer","aed","musical_instrument","av_other","furniture","phone","hotspot","keys","access_fob","id_badge","uniform","radio","other"]},"manufacturer":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNumber":{"type":"string","nullable":true},"acquiredOn":{"type":"string","format":"date","nullable":true},"purchaseCostCents":{"type":"integer","nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken","retired","lost","stolen"]},"status":{"type":"string","enum":["active","in_repair","retired","lost","stolen"]},"depreciationMethod":{"type":"string","enum":["straight_line","none"]},"depreciationStartDate":{"type":"string","format":"date","nullable":true},"usefulLifeMonths":{"type":"integer","nullable":true},"salvageValueCents":{"type":"integer","nullable":true},"currentBookValueCents":{"type":"integer","nullable":true},"bookValueAsOf":{"type":"string","format":"date-time","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedAt":{"type":"string","format":"date-time","nullable":true},"warrantyExpiresOn":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deltaCents":{"type":"integer"},"reasonCode":{"type":"string","enum":["write_down","revaluation","repair_capitalized","correction","other"]},"reason":{"type":"string"},"newBookValueCents":{"type":"integer","minimum":0},"appliedOn":{"type":"string","format":"date"},"recordedByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deltaCents","reasonCode","reason","newBookValueCents","appliedOn","recordedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","districtId","schoolId","roomId","tag","name","category","manufacturer","model","serialNumber","acquiredOn","purchaseCostCents","condition","status","depreciationMethod","depreciationStartDate","usefulLifeMonths","salvageValueCents","currentBookValueCents","bookValueAsOf","assignedToPersonId","assignedToName","assignedAt","warrantyExpiresOn","notes","roomNumber","createdAt","updatedAt","deletedAt","adjustments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings/sites":{"get":{"summary":"Buildings a facilities user can pick between, with the work waiting at each","tags":["Facilities"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"active":{"type":"integer","minimum":0},"overdue":{"type":"integer","minimum":0},"unassigned":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["buildingId","name","code","schoolId","schoolName","isPrimary","active","overdue","unassigned","total"],"additionalProperties":false}},"district":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true}},"required":["id","name","shortName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","district","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings":{"get":{"summary":"List buildings (room + open work-order roll-ups)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRetired","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string"},"code":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"floorsCount":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"roomCount":{"type":"integer","minimum":0},"openWorkOrderCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","name","code","addressLine1","city","state","zipCode","yearBuilt","squareFeet","floorsCount","notes","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a building (emits BuildingCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"schoolId":{"type":"string","format":"uuid"},"code":{"type":"string","maxLength":30},"addressLine1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","maxLength":10},"yearBuilt":{"type":"integer","minimum":1700,"maximum":2100},"squareFeet":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":50000000},"floorsCount":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":200},"notes":{"type":"string","maxLength":5000},"isActive":{"type":"boolean","default":true}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string"},"code":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"floorsCount":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"roomCount":{"type":"integer","minimum":0},"openWorkOrderCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string"},"floor":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"}},"required":["id","number","name","roomType","floor","capacity","isBookable"],"additionalProperties":false}}},"required":["id","districtId","schoolId","name","code","addressLine1","city","state","zipCode","yearBuilt","squareFeet","floorsCount","notes","isActive","createdAt","updatedAt","deletedAt","rooms"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings/{id}":{"get":{"summary":"Get a building with its rooms","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string"},"code":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"floorsCount":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"roomCount":{"type":"integer","minimum":0},"openWorkOrderCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string"},"floor":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"}},"required":["id","number","name","roomType","floor","capacity","isBookable"],"additionalProperties":false}}},"required":["id","districtId","schoolId","name","code","addressLine1","city","state","zipCode","yearBuilt","squareFeet","floorsCount","notes","isActive","createdAt","updatedAt","deletedAt","rooms"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a building (emits BuildingUpdated when fields change)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"schoolId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"string","maxLength":30,"nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":100,"nullable":true},"state":{"type":"string","minLength":2,"maxLength":2,"nullable":true},"zipCode":{"type":"string","maxLength":10,"nullable":true},"yearBuilt":{"type":"integer","minimum":1700,"maximum":2100,"nullable":true},"squareFeet":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":50000000,"nullable":true},"floorsCount":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":200,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string"},"code":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"floorsCount":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"roomCount":{"type":"integer","minimum":0},"openWorkOrderCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string"},"floor":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"}},"required":["id","number","name","roomType","floor","capacity","isBookable"],"additionalProperties":false}}},"required":["id","districtId","schoolId","name","code","addressLine1","city","state","zipCode","yearBuilt","squareFeet","floorsCount","notes","isActive","createdAt","updatedAt","deletedAt","rooms"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings/{id}/retire":{"post":{"summary":"Retire a building (soft-delete; ?force=true detaches linked rooms)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"force","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string"},"code":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"floorsCount":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"roomCount":{"type":"integer","minimum":0},"openWorkOrderCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string"},"floor":{"type":"string","nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"}},"required":["id","number","name","roomType","floor","capacity","isBookable"],"additionalProperties":false}}},"required":["id","districtId","schoolId","name","code","addressLine1","city","state","zipCode","yearBuilt","squareFeet","floorsCount","notes","isActive","createdAt","updatedAt","deletedAt","rooms"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings/{buildingId}/documents":{"get":{"summary":"List the files held for a building","tags":["Facilities"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"pageCount":{"type":"integer","nullable":true},"description":{"type":"string","nullable":true},"certificateId":{"type":"string","nullable":true},"uploadedAt":{"type":"string"}},"required":["id","category","title","filename","mimeType","sizeBytes","pageCount","description","certificateId","uploadedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Attach a file to a building","tags":["Facilities"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"buildingId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/buildings/documents/{id}/download":{"get":{"summary":"Download a building file","tags":["Facilities"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/buildings/documents/{id}/view":{"get":{"summary":"View a building file in the browser","tags":["Facilities"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/buildings/documents/{id}":{"delete":{"summary":"Remove a building file","tags":["Facilities"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/vehicles":{"get":{"summary":"Fleet","tags":["Transportation"],"parameters":[{"schema":{"type":"string","enum":["active","out_of_service","spare","retired","all"],"default":"all"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a vehicle","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"busNumber":{"type":"string","minLength":1,"maxLength":30},"vin":{"type":"string","maxLength":30,"nullable":true},"plate":{"type":"string","maxLength":20,"nullable":true},"make":{"type":"string","maxLength":60,"nullable":true},"model":{"type":"string","maxLength":60,"nullable":true},"modelYear":{"type":"integer","minimum":1980,"maximum":2100,"nullable":true},"vehicleType":{"type":"string","enum":["type_i","type_ii","van","car","wheelchair"],"default":"type_i"},"capacity":{"type":"integer","minimum":1,"maximum":100,"nullable":true},"wheelchairPositions":{"type":"integer","minimum":0,"maximum":20,"default":0},"hasLift":{"type":"boolean","default":false},"hasCamera":{"type":"boolean","default":false},"ownership":{"type":"string","enum":["district","contractor"],"default":"district"},"contractorName":{"type":"string","maxLength":200,"nullable":true},"status":{"type":"string","enum":["active","out_of_service","spare","retired"],"default":"active"},"lastInspectionOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"inspectionDueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"registrationExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"insuranceExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"odometer":{"type":"integer","minimum":0,"nullable":true},"garageLocation":{"type":"string","maxLength":200,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["busNumber"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/vehicles/{id}":{"get":{"summary":"A vehicle with its maintenance log and routes","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a vehicle","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"busNumber":{"type":"string","minLength":1,"maxLength":30},"vin":{"type":"string","maxLength":30,"nullable":true},"plate":{"type":"string","maxLength":20,"nullable":true},"make":{"type":"string","maxLength":60,"nullable":true},"model":{"type":"string","maxLength":60,"nullable":true},"modelYear":{"type":"integer","minimum":1980,"maximum":2100,"nullable":true},"vehicleType":{"type":"string","enum":["type_i","type_ii","van","car","wheelchair"],"default":"type_i"},"capacity":{"type":"integer","minimum":1,"maximum":100,"nullable":true},"wheelchairPositions":{"type":"integer","minimum":0,"maximum":20,"default":0},"hasLift":{"type":"boolean","default":false},"hasCamera":{"type":"boolean","default":false},"ownership":{"type":"string","enum":["district","contractor"],"default":"district"},"contractorName":{"type":"string","maxLength":200,"nullable":true},"status":{"type":"string","enum":["active","out_of_service","spare","retired"],"default":"active"},"lastInspectionOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"inspectionDueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"registrationExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"insuranceExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"odometer":{"type":"integer","minimum":0,"nullable":true},"garageLocation":{"type":"string","maxLength":200,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/vehicles/{id}/maintenance":{"post":{"summary":"Log an inspection, repair, service or pre-trip defect","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["inspection","repair","service","pretrip_defect","recall","other"]},"onDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"odometer":{"type":"integer","minimum":0,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":1000},"vendor":{"type":"string","maxLength":200,"nullable":true},"costCents":{"type":"integer","minimum":0,"nullable":true},"outOfServiceUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"resolvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"nextDueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"nextDueOdometer":{"type":"integer","minimum":0,"nullable":true}},"required":["kind","onDate","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/maintenance/{id}":{"patch":{"summary":"Resolve or correct a maintenance entry","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["inspection","repair","service","pretrip_defect","recall","other"]},"onDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"odometer":{"type":"integer","minimum":0,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":1000},"vendor":{"type":"string","maxLength":200,"nullable":true},"costCents":{"type":"integer","minimum":0,"nullable":true},"outOfServiceUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"resolvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"nextDueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"nextDueOdometer":{"type":"integer","minimum":0,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/drivers":{"get":{"summary":"Drivers and aides","tags":["Transportation"],"parameters":[{"schema":{"type":"string","enum":["active","inactive","suspended","all"],"default":"active"},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["driver","aide","all"],"default":"all"},"in":"query","name":"role","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a driver or aide","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"role":{"type":"string","enum":["driver","aide"],"default":"driver"},"employer":{"type":"string","enum":["district","contractor"],"default":"district"},"contractorName":{"type":"string","maxLength":200,"nullable":true},"status":{"type":"string","enum":["active","inactive","suspended"],"default":"active"},"licenseNumber":{"type":"string","maxLength":40,"nullable":true},"licenseState":{"type":"string","minLength":2,"maxLength":2,"nullable":true},"cdlClass":{"type":"string","maxLength":5,"nullable":true},"endorsements":{"type":"string","maxLength":20,"nullable":true},"cdlExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"medicalCardExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"backgroundCheckOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"trainingCompletedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"drivingRecordCheckedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"hiredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["firstName","lastName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/drivers/{id}":{"patch":{"summary":"Edit a driver or aide","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"role":{"type":"string","enum":["driver","aide"],"default":"driver"},"employer":{"type":"string","enum":["district","contractor"],"default":"district"},"contractorName":{"type":"string","maxLength":200,"nullable":true},"status":{"type":"string","enum":["active","inactive","suspended"],"default":"active"},"licenseNumber":{"type":"string","maxLength":40,"nullable":true},"licenseState":{"type":"string","minLength":2,"maxLength":2,"nullable":true},"cdlClass":{"type":"string","maxLength":5,"nullable":true},"endorsements":{"type":"string","maxLength":20,"nullable":true},"cdlExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"medicalCardExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"backgroundCheckOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"trainingCompletedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"drivingRecordCheckedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"hiredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/compliance":{"get":{"summary":"Expired and due-soon items across fleet, drivers and routes","tags":["Transportation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/contractors":{"get":{"summary":"Contractors","tags":["Transportation"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a contractor","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"type":"string","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"address":{"type":"string","maxLength":500,"nullable":true},"contractNumber":{"type":"string","maxLength":60,"nullable":true},"contractStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"contractEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"routeRateCents":{"type":"integer","minimum":0,"nullable":true},"studentRateCents":{"type":"integer","minimum":0,"nullable":true},"accountCode":{"type":"string","maxLength":40,"nullable":true},"status":{"type":"string","enum":["active","inactive"],"default":"active"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/contractors/{id}":{"patch":{"summary":"Edit a contractor","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"type":"string","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"address":{"type":"string","maxLength":500,"nullable":true},"contractNumber":{"type":"string","maxLength":60,"nullable":true},"contractStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"contractEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"routeRateCents":{"type":"integer","minimum":0,"nullable":true},"studentRateCents":{"type":"integer","minimum":0,"nullable":true},"accountCode":{"type":"string","maxLength":40,"nullable":true},"status":{"type":"string","enum":["active","inactive"],"default":"active"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/needs":{"get":{"summary":"Special-needs transportation on file","tags":["Transportation"],"parameters":[{"schema":{"type":"string","enum":["open","requested","approved","active","ended","denied","all"],"default":"open"},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["special_ed","out_of_district","homeless","foster","courtesy","medical","other"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","enum":["district_route","contractor","parent_reimbursement","public_transit","aid_in_lieu","none"]},"in":"query","name":"providerType","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"contractorId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentPersonId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a special-needs transportation entitlement","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["special_ed","out_of_district","homeless","foster","courtesy","medical","other"]},"iepRecordId":{"type":"string","format":"uuid","nullable":true},"requiredByIep":{"type":"boolean","default":false},"destinationOrganizationId":{"type":"string","format":"uuid","nullable":true},"destinationName":{"type":"string","maxLength":300,"nullable":true},"destinationAddress":{"type":"string","maxLength":500,"nullable":true},"pickupAddress":{"type":"string","maxLength":500,"nullable":true},"accommodations":{"type":"array","items":{"type":"string","enum":["wheelchair","lift","aide","harness","car_seat","monitor","door_to_door","nurse","no_transfer"]},"default":[]},"maxRideMinutes":{"type":"integer","minimum":1,"maximum":300,"nullable":true},"providerType":{"type":"string","enum":["district_route","contractor","parent_reimbursement","public_transit","aid_in_lieu","none"]},"contractorId":{"type":"string","format":"uuid","nullable":true},"routeId":{"type":"string","format":"uuid","nullable":true},"dailyRateCents":{"type":"integer","minimum":0,"nullable":true},"mileageRateCents":{"type":"integer","minimum":0,"nullable":true},"oneWayMiles":{"type":"number","minimum":0,"maximum":999,"nullable":true},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["requested","approved","active","ended","denied"],"default":"requested"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["studentPersonId","kind","providerType","effectiveFrom"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/needs/{id}":{"patch":{"summary":"Update, approve, end or deny a need","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["special_ed","out_of_district","homeless","foster","courtesy","medical","other"]},"iepRecordId":{"type":"string","format":"uuid","nullable":true},"requiredByIep":{"type":"boolean","default":false},"destinationOrganizationId":{"type":"string","format":"uuid","nullable":true},"destinationName":{"type":"string","maxLength":300,"nullable":true},"destinationAddress":{"type":"string","maxLength":500,"nullable":true},"pickupAddress":{"type":"string","maxLength":500,"nullable":true},"accommodations":{"type":"array","items":{"type":"string","enum":["wheelchair","lift","aide","harness","car_seat","monitor","door_to_door","nurse","no_transfer"]},"default":[]},"maxRideMinutes":{"type":"integer","minimum":1,"maximum":300,"nullable":true},"providerType":{"type":"string","enum":["district_route","contractor","parent_reimbursement","public_transit","aid_in_lieu","none"]},"contractorId":{"type":"string","format":"uuid","nullable":true},"routeId":{"type":"string","format":"uuid","nullable":true},"dailyRateCents":{"type":"integer","minimum":0,"nullable":true},"mileageRateCents":{"type":"integer","minimum":0,"nullable":true},"oneWayMiles":{"type":"number","minimum":0,"maximum":999,"nullable":true},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["requested","approved","active","ended","denied"],"default":"requested"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/contractors/{id}/invoices":{"get":{"summary":"A contractor’s monthly bills","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Build a month’s bill: routes on contractor buses at the route rate, students carried at their daily rate, times school days","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"replaceDraft":{"type":"boolean","default":true}},"required":["month"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/invoices/{id}":{"patch":{"summary":"Review, approve, dispute or mark a bill paid","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","reviewed","approved","paid","disputed"]},"invoicedCents":{"type":"integer","minimum":0,"nullable":true},"invoiceNumber":{"type":"string","maxLength":60,"nullable":true},"poReference":{"type":"string","maxLength":60,"nullable":true},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"paidOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/aid-in-lieu":{"get":{"summary":"Aid-in-lieu payments by year","tags":["Transportation"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record an aid-in-lieu entitlement","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"nonpublicSchool":{"type":"string","minLength":1,"maxLength":300},"schoolAddress":{"type":"string","maxLength":500,"nullable":true},"reason":{"type":"string","enum":["remote","no_route","nonpublic_choice","other"]},"amountCents":{"type":"integer","minimum":0},"status":{"type":"string","enum":["requested","approved","denied","paid","cancelled"],"default":"requested"},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"installments":{"type":"array","items":{"type":"object","properties":{"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountCents":{"type":"integer","minimum":0},"paidOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"checkNumber":{"type":"string","maxLength":40,"nullable":true}},"required":["dueOn","amountCents"],"additionalProperties":false},"nullable":true},"parentName":{"type":"string","maxLength":200,"nullable":true},"parentAddress":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["studentPersonId","fiscalYear","nonpublicSchool","reason","amountCents"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/aid-in-lieu/{id}":{"patch":{"summary":"Approve, pay installments, or cancel","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"nonpublicSchool":{"type":"string","minLength":1,"maxLength":300},"schoolAddress":{"type":"string","maxLength":500,"nullable":true},"reason":{"type":"string","enum":["remote","no_route","nonpublic_choice","other"]},"amountCents":{"type":"integer","minimum":0},"status":{"type":"string","enum":["requested","approved","denied","paid","cancelled"],"default":"requested"},"approvedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"boardApprovedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"installments":{"type":"array","items":{"type":"object","properties":{"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountCents":{"type":"integer","minimum":0},"paidOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"checkNumber":{"type":"string","maxLength":40,"nullable":true}},"required":["dueOn","amountCents"],"additionalProperties":false},"nullable":true},"parentName":{"type":"string","maxLength":200,"nullable":true},"parentAddress":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/special-report":{"get":{"summary":"Counts the DRTRS asks for: students by kind and provider, contractor spend, aid in lieu","tags":["Transportation"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/notices/preview":{"post":{"summary":"Who a notice would reach, and the text they would get","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["assignment","delay","cancellation","early_dismissal","change","other"]},"routeId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"run":{"type":"string","enum":["am","pm","both"],"default":"both"},"delayMinutes":{"type":"integer","minimum":1,"maximum":600},"subject":{"type":"string","maxLength":300},"message":{"type":"string","maxLength":5000}},"required":["kind"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/notices":{"post":{"summary":"Send a notice to the families on a route or of one student","tags":["Transportation"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["assignment","delay","cancellation","early_dismissal","change","other"]},"routeId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"run":{"type":"string","enum":["am","pm","both"],"default":"both"},"delayMinutes":{"type":"integer","minimum":1,"maximum":600},"subject":{"type":"string","maxLength":300},"message":{"type":"string","maxLength":5000}},"required":["kind"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"Notices sent","tags":["Transportation"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"routeId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transportation/drtrs-export":{"get":{"summary":"CSV of every transported resident student for the year, in DRTRS student-record order","tags":["Transportation"],"parameters":[{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/food/items":{"get":{"summary":"Food catalog","tags":["Food service"],"parameters":[{"schema":{"type":"string","enum":["entree","side","fruit","vegetable","grain","milk","condiment","snack","beverage"]},"in":"query","name":"category","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a food item","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["entree","side","fruit","vegetable","grain","milk","condiment","snack","beverage"]},"servingSize":{"type":"string","maxLength":60,"nullable":true},"components":{"type":"object","properties":{"meatAlt":{"type":"number","minimum":0,"maximum":10,"default":0},"grain":{"type":"number","minimum":0,"maximum":10,"default":0},"fruit":{"type":"number","minimum":0,"maximum":5,"default":0},"vegetable":{"type":"number","minimum":0,"maximum":5,"default":0},"vegSubgroup":{"type":"string","enum":["dark_green","red_orange","beans_peas","starchy","other"],"nullable":true},"milk":{"type":"number","minimum":0,"maximum":2,"default":0}},"additionalProperties":false,"default":{}},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","shellfish","tree_nuts","peanuts","wheat","soy","sesame"]},"default":[]},"caloriesKcal":{"type":"integer","minimum":0,"maximum":3000,"nullable":true},"sodiumMg":{"type":"integer","minimum":0,"maximum":5000,"nullable":true},"satFatG":{"type":"number","minimum":0,"maximum":100,"nullable":true},"wholeGrainRich":{"type":"boolean","default":false},"costCents":{"type":"integer","minimum":0,"nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorSku":{"type":"string","maxLength":60,"nullable":true},"purchaseUnit":{"type":"string","maxLength":60,"nullable":true},"servingsPerUnit":{"type":"integer","minimum":1,"nullable":true},"isActive":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["name","category"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/items/{id}":{"patch":{"summary":"Edit a food item","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["entree","side","fruit","vegetable","grain","milk","condiment","snack","beverage"]},"servingSize":{"type":"string","maxLength":60,"nullable":true},"components":{"type":"object","properties":{"meatAlt":{"type":"number","minimum":0,"maximum":10,"default":0},"grain":{"type":"number","minimum":0,"maximum":10,"default":0},"fruit":{"type":"number","minimum":0,"maximum":5,"default":0},"vegetable":{"type":"number","minimum":0,"maximum":5,"default":0},"vegSubgroup":{"type":"string","enum":["dark_green","red_orange","beans_peas","starchy","other"],"nullable":true},"milk":{"type":"number","minimum":0,"maximum":2,"default":0}},"additionalProperties":false,"default":{}},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","shellfish","tree_nuts","peanuts","wheat","soy","sesame"]},"default":[]},"caloriesKcal":{"type":"integer","minimum":0,"maximum":3000,"nullable":true},"sodiumMg":{"type":"integer","minimum":0,"maximum":5000,"nullable":true},"satFatG":{"type":"number","minimum":0,"maximum":100,"nullable":true},"wholeGrainRich":{"type":"boolean","default":false},"costCents":{"type":"integer","minimum":0,"nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorSku":{"type":"string","maxLength":60,"nullable":true},"purchaseUnit":{"type":"string","maxLength":60,"nullable":true},"servingsPerUnit":{"type":"integer","minimum":1,"nullable":true},"isActive":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/vendors":{"get":{"summary":"Food vendors","tags":["Food service"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a vendor","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"type":"string","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"orderDay":{"type":"string","enum":["M","T","W","R","F"],"nullable":true},"deliveryDay":{"type":"string","enum":["M","T","W","R","F"],"nullable":true},"accountNumber":{"type":"string","maxLength":60,"nullable":true},"contractRef":{"type":"string","maxLength":60,"nullable":true},"isUsdaFoods":{"type":"boolean","default":false},"status":{"type":"string","enum":["active","inactive"],"default":"active"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/vendors/{id}":{"patch":{"summary":"Edit a vendor","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"type":"string","maxLength":200,"nullable":true},"phone":{"type":"string","maxLength":30,"nullable":true},"email":{"type":"string","format":"email","maxLength":200,"nullable":true},"orderDay":{"type":"string","enum":["M","T","W","R","F"],"nullable":true},"deliveryDay":{"type":"string","enum":["M","T","W","R","F"],"nullable":true},"accountNumber":{"type":"string","maxLength":60,"nullable":true},"contractRef":{"type":"string","maxLength":60,"nullable":true},"isUsdaFoods":{"type":"boolean","default":false},"status":{"type":"string","enum":["active","inactive"],"default":"active"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/cycles":{"get":{"summary":"Menu cycles","tags":["Food service"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a cycle","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"menuGroup":{"type":"string","minLength":1,"maxLength":40},"mealType":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"weeks":{"type":"integer","minimum":1,"maximum":8,"default":1},"isActive":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["name","menuGroup","mealType"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/cycles/{id}":{"get":{"summary":"A cycle with its grid","tags":["Food service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a cycle","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"menuGroup":{"type":"string","minLength":1,"maxLength":40},"mealType":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"weeks":{"type":"integer","minimum":1,"maximum":8,"default":1},"isActive":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/cycles/{id}/days":{"put":{"summary":"Set the whole cycle grid","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","minimum":1,"maximum":8},"dayOfWeek":{"type":"integer","minimum":1,"maximum":5},"items":{"type":"array","items":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid"},"choice":{"type":"string","maxLength":2,"nullable":true}},"required":["foodItemId"],"additionalProperties":false},"maxItems":40}},"required":["week","dayOfWeek","items"],"additionalProperties":false},"maxItems":40}},"required":["days"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/cycles/{id}/apply":{"post":{"summary":"Write daily menus from the cycle over a date range (weekdays; existing published days are kept)","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"startWeek":{"type":"integer","minimum":1,"maximum":8,"default":1},"overwriteDrafts":{"type":"boolean","default":true}},"required":["from","to"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/menus":{"get":{"summary":"Menus for a date range; drafts only with menu.manage","tags":["Food service"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"group","required":false},{"schema":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"in":"query","name":"meal","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"items":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","items","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Set one day","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"menuGroup":{"type":"string","minLength":1,"maxLength":40},"mealType":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"items":{"type":"array","items":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid"},"choice":{"type":"string","maxLength":2,"nullable":true}},"required":["foodItemId"],"additionalProperties":false},"maxItems":40},"note":{"type":"string","maxLength":300,"nullable":true},"plannedCount":{"type":"integer","minimum":0,"nullable":true}},"required":["menuGroup","mealType","date","items"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/menus/publish":{"post":{"summary":"Publish (or unpublish) a range","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string","minLength":1,"maxLength":40},"meal":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"publish":{"type":"boolean","default":true}},"required":["group","meal","from","to"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/orders":{"get":{"summary":"Purchase orders","tags":["Food service"],"parameters":[{"schema":{"type":"string","enum":["open","draft","submitted","received","partial","cancelled","all"],"default":"open"},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"vendorId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an order (draft)","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"deliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"schoolOrganizationId":{"type":"string","format":"uuid","nullable":true},"lines":{"type":"array","items":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"unit":{"type":"string","maxLength":60,"nullable":true},"quantity":{"type":"number","minimum":0,"maximum":100000},"unitCostCents":{"type":"integer","minimum":0,"default":0},"receivedQuantity":{"type":"number","minimum":0,"nullable":true}},"required":["name","quantity"],"additionalProperties":false},"minItems":1,"maxItems":500},"poReference":{"type":"string","maxLength":60,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["vendorId","deliveryDate","lines"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/orders/{id}":{"patch":{"summary":"Edit lines, submit, receive (with quantities), cancel","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"unit":{"type":"string","maxLength":60,"nullable":true},"quantity":{"type":"number","minimum":0,"maximum":100000},"unitCostCents":{"type":"integer","minimum":0,"default":0},"receivedQuantity":{"type":"number","minimum":0,"nullable":true}},"required":["name","quantity"],"additionalProperties":false},"maxItems":500},"deliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["draft","submitted","received","partial","cancelled"]},"receivedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"poReference":{"type":"string","maxLength":60,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/orders/suggest":{"post":{"summary":"Suggested lines for a vendor from the published menus and planned counts in a range","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"group":{"type":"string","maxLength":40},"defaultCount":{"type":"integer","minimum":0,"default":0}},"required":["vendorId","from","to"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/production":{"get":{"summary":"The production record for a school/meal/date, or a prefilled draft","tags":["Food service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":true},{"schema":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"in":"query","name":"meal","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"date","required":true},{"schema":{"type":"string","maxLength":40},"in":"query","name":"group","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save a draft production record","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"mealType":{"type":"string","enum":["breakfast","lunch","snack","supper"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"menuGroup":{"type":"string","minLength":1,"maxLength":40},"lines":{"type":"array","items":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"portion":{"type":"string","maxLength":60,"nullable":true},"plannedServings":{"type":"integer","minimum":0,"default":0},"preparedServings":{"type":"integer","minimum":0,"default":0},"servedServings":{"type":"integer","minimum":0,"default":0},"leftoverServings":{"type":"integer","minimum":0,"default":0},"tempF":{"type":"number","minimum":-40,"maximum":300,"nullable":true},"note":{"type":"string","maxLength":200,"nullable":true}},"required":["name"],"additionalProperties":false},"maxItems":60},"mealsStudent":{"type":"integer","minimum":0,"default":0},"mealsAdult":{"type":"integer","minimum":0,"default":0},"mealsAlaCarte":{"type":"integer","minimum":0,"default":0},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["schoolId","mealType","date","menuGroup","lines"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/production/{id}/finalize":{"post":{"summary":"Finalize; posts inventory use for catalog items","tags":["Food service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/production/{id}/reopen":{"post":{"summary":"Reopen a final record; reverses its inventory use","tags":["Food service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/production/list":{"get":{"summary":"Production records in a range","tags":["Food service"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/inventory":{"get":{"summary":"Stock on hand at a location","tags":["Food service"],"parameters":[{"schema":{"type":"string","maxLength":40,"default":"central"},"in":"query","name":"location","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/inventory/{id}":{"patch":{"summary":"Set a par level","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parLevel":{"type":"number","minimum":0,"nullable":true}},"required":["parLevel"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/inventory/transactions":{"post":{"summary":"Adjust, count, record waste, or transfer between locations","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"foodItemId":{"type":"string","format":"uuid"},"location":{"type":"string","minLength":1,"maxLength":40},"kind":{"type":"string","enum":["adjustment","count","waste","transfer","receipt"]},"quantity":{"type":"number","minimum":-100000,"maximum":100000},"toLocation":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":300,"nullable":true},"occurredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["foodItemId","location","kind","quantity"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"Stock movements","tags":["Food service"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"location","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"itemId","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/meal-service/online-payments":{"get":{"summary":"Whether the district takes card payments for meals","tags":["Parent Portal"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"minCents":{"type":"number"},"maxCents":{"type":"number"}},"required":["enabled","minCents","maxCents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/meal-service/checkout":{"post":{"summary":"Start card checkout to add funds","tags":["Parent Portal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","minimum":500,"maximum":50000}},"required":["amountCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"paymentId":{"type":"string"}},"required":["url","paymentId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/parent/students/{id}/meal-service/settings":{"patch":{"summary":"Set the low-balance alert level","tags":["Parent Portal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lowBalanceThresholdCents":{"type":"integer","minimum":0,"maximum":10000}},"required":["lowBalanceThresholdCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/payments":{"get":{"summary":"Online top-ups","tags":["Food service"],"parameters":[{"schema":{"type":"string","enum":["pending","paid","expired","failed","all"],"default":"all"},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"enabled":{"type":"boolean"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","enabled","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/accounts/low-balance":{"get":{"summary":"Accounts at or below their alert level","tags":["Food service"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/accounts/low-balance/notify":{"post":{"summary":"Email guardians of low or negative balances (dryRun previews)","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":5000},"dryRun":{"type":"boolean","default":true}},"required":["accountIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims/settings":{"get":{"summary":"Claim settings: rates and sites","tags":["Food service"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"schools":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["schools","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save claim settings","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rates":{"type":"object","additionalProperties":{"type":"object","properties":{"breakfast":{"type":"object","properties":{"federal":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}},"state":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}}},"additionalProperties":false,"default":{}},"lunch":{"type":"object","properties":{"federal":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}},"state":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}}},"additionalProperties":false,"default":{}},"snack":{"type":"object","properties":{"federal":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}},"state":{"type":"object","properties":{"free":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"reduced":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null},"paid":{"type":"integer","minimum":0,"maximum":2000,"nullable":true,"default":null}},"additionalProperties":false,"default":{}}},"additionalProperties":false,"default":{}}},"additionalProperties":false},"default":{}},"sites":{"type":"object","additionalProperties":{"type":"object","properties":{"cep":{"type":"boolean","default":false},"isp":{"type":"number","minimum":0,"maximum":100,"nullable":true,"default":null},"snearsSiteCode":{"type":"string","maxLength":20,"nullable":true,"default":null},"programs":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","snack"]},"default":["breakfast","lunch"]}},"additionalProperties":false},"default":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims/days":{"get":{"summary":"Daily counts for a school and month","tags":["Food service"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"query","name":"month","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Enter or correct one day of counts (closes the day)","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"mealType":{"type":"string","enum":["breakfast","lunch","snack"]},"free":{"type":"integer","minimum":0,"maximum":10000},"reduced":{"type":"integer","minimum":0,"maximum":10000},"paid":{"type":"integer","minimum":0,"maximum":10000},"adult":{"type":"integer","minimum":0,"maximum":10000,"default":0},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["schoolId","date","mealType","free","reduced","paid"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims/build":{"post":{"summary":"Build or refresh draft claims for a month","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["month"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims":{"get":{"summary":"Claims for a month","tags":["Food service"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"query","name":"month","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims/{id}":{"patch":{"summary":"Submit, mark paid, or return to draft","tags":["Food service"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","paid"]},"snearsConfirmation":{"type":"string","maxLength":60,"nullable":true},"paidOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"paidCents":{"type":"integer","minimum":0,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"overrideErrors":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/food/claims/export":{"get":{"summary":"SNEARS entry sheet for a month (CSV)","tags":["Food service"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"query","name":"month","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/assignees":{"get":{"summary":"Staff who can be assigned work orders and maintenance","tags":["Facilities"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"facilityRoles":{"type":"array","items":{"type":"string"}}},"required":["personId","name","email","facilityRoles"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/user-search":{"get":{"summary":"Find district users to assign to buildings","tags":["Facilities"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true},{"schema":{"type":"integer","minimum":1,"maximum":25,"default":10},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments":{"get":{"summary":"List facility assignments","tags":["Facilities"],"parameters":[{"schema":{"type":"string","maxLength":191},"in":"query","name":"userId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"in":"query","name":"facilityRole","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRevoked","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"assignedByUserId":{"type":"string"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","userId","buildingId","buildingName","facilityRole","assignedByUserId","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Assign a person to buildings (also grants the Facilities module)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":191},"buildingIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":200,"default":[]},"districtWide":{"type":"boolean","default":false},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"],"default":"technician"},"notes":{"type":"string","maxLength":500},"grantModule":{"type":"boolean","default":true}},"required":["userId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"assignedByUserId":{"type":"string"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","userId","buildingId","buildingName","facilityRole","assignedByUserId","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"string","format":"uuid"}},"moduleGranted":{"type":"boolean"}},"required":["created","skipped","moduleGranted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/personnel":{"get":{"summary":"Roster of everyone with facilities access and the buildings they cover","tags":["Facilities"],"parameters":[{"schema":{"type":"boolean","default":true},"in":"query","name":"activeOnly","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"},"status":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"hasModuleGrant":{"type":"boolean"},"districtWide":{"type":"boolean"},"facilityRoles":{"type":"array","items":{"type":"string"}},"buildings":{"type":"array","items":{"type":"object","properties":{"assignmentId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"facilityRole":{"type":"string"}},"required":["assignmentId","buildingId","buildingName","facilityRole"],"additionalProperties":false}}},"required":["userId","name","email","status","roles","hasModuleGrant","districtWide","facilityRoles","buildings"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/my-scope":{"get":{"summary":"The caller's own building scope","tags":["Facilities"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtWide":{"type":"boolean"},"facilityRoles":{"type":"array","items":{"type":"string"}},"canOpenWorkOrders":{"type":"boolean"},"workOrderVisibility":{"type":"string","enum":["all","buildings","assigned","none"]},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string","nullable":true}},"required":["id","name","code"],"additionalProperties":false}}},"required":["districtWide","facilityRoles","canOpenWorkOrders","workOrderVisibility","buildings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/{id}":{"get":{"summary":"Get one facility assignment","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"assignedByUserId":{"type":"string"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","userId","buildingId","buildingName","facilityRole","assignedByUserId","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/{id}/role":{"patch":{"summary":"Change the level someone holds at one building","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]}},"required":["facilityRole"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"assignedByUserId":{"type":"string"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","userId","buildingId","buildingName","facilityRole","assignedByUserId","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/{id}/revoke":{"post":{"summary":"Revoke one facility assignment","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"facilityRole":{"type":"string","enum":["manager","supervisor","technician","inspector","viewer"]},"assignedByUserId":{"type":"string"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","userId","buildingId","buildingName","facilityRole","assignedByUserId","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-assignments/users/{userId}/revoke-all":{"post":{"summary":"Revoke a person's entire facilities access","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500},"revokeModule":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":191},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"userId":{"type":"string"},"revokedCount":{"type":"integer","minimum":0},"moduleRevoked":{"type":"boolean"}},"required":["userId","revokedCount","moduleRevoked"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-templates":{"get":{"summary":"List inspection templates","tags":["Facilities"],"parameters":[{"schema":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"boolean"},"in":"query","name":"producesCertificate","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRetired","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","nullable":true},"leadTimeDays":{"type":"integer"},"regulatoryCitation":{"type":"string","nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"itemCount":{"type":"integer","minimum":0},"openInspectionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","name","code","description","category","frequency","intervalDays","leadTimeDays","regulatoryCitation","producesCertificate","requiresExternalInspector","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an inspection template (emits InspectionTemplateCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","maxLength":5000},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"],"default":"other"},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"],"default":"annual"},"intervalDays":{"type":"integer","minimum":1,"maximum":3650},"leadTimeDays":{"type":"integer","minimum":0,"maximum":365,"default":14},"regulatoryCitation":{"type":"string","maxLength":200},"producesCertificate":{"type":"boolean","default":false},"requiresExternalInspector":{"type":"boolean","default":false},"isActive":{"type":"boolean","default":true},"items":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"helpText":{"type":"string","maxLength":2000},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"],"default":"pass_fail_na"},"isCritical":{"type":"boolean","default":false},"autoCreateWorkOrder":{"type":"boolean","default":true},"workOrderCategory":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"workOrderPriority":{"type":"string","enum":["low","normal","high","urgent"],"default":"high"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"unit":{"type":"string","maxLength":20},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false},"minItems":2,"maxItems":12},"sectionLabel":{"type":"string","maxLength":100},"weight":{"type":"integer","minimum":0,"maximum":100,"default":1},"isRequired":{"type":"boolean","default":true},"requiresPhoto":{"type":"boolean","default":false}},"required":["prompt"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["name","code","items"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","nullable":true},"leadTimeDays":{"type":"integer"},"regulatoryCitation":{"type":"string","nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"itemCount":{"type":"integer","minimum":0},"openInspectionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"position":{"type":"integer"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"]},"isCritical":{"type":"boolean"},"autoCreateWorkOrder":{"type":"boolean"},"workOrderCategory":{"type":"string","nullable":true},"workOrderPriority":{"type":"string"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"}},"required":["id","templateId","position","prompt","helpText","inputType","isCritical","autoCreateWorkOrder","workOrderCategory","workOrderPriority","minValue","maxValue","unit","options","sectionLabel","weight","isRequired","requiresPhoto"],"additionalProperties":false}}},"required":["id","districtId","name","code","description","category","frequency","intervalDays","leadTimeDays","regulatoryCitation","producesCertificate","requiresExternalInspector","isActive","createdAt","updatedAt","deletedAt","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-templates/{id}":{"get":{"summary":"Get an inspection template with its checklist","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","nullable":true},"leadTimeDays":{"type":"integer"},"regulatoryCitation":{"type":"string","nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"itemCount":{"type":"integer","minimum":0},"openInspectionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"position":{"type":"integer"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"]},"isCritical":{"type":"boolean"},"autoCreateWorkOrder":{"type":"boolean"},"workOrderCategory":{"type":"string","nullable":true},"workOrderPriority":{"type":"string"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"}},"required":["id","templateId","position","prompt","helpText","inputType","isCritical","autoCreateWorkOrder","workOrderCategory","workOrderPriority","minValue","maxValue","unit","options","sectionLabel","weight","isRequired","requiresPhoto"],"additionalProperties":false}}},"required":["id","districtId","name","code","description","category","frequency","intervalDays","leadTimeDays","regulatoryCitation","producesCertificate","requiresExternalInspector","isActive","createdAt","updatedAt","deletedAt","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a template; sending `items` replaces the whole checklist","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","minimum":1,"maximum":3650,"nullable":true},"leadTimeDays":{"type":"integer","minimum":0,"maximum":365},"regulatoryCitation":{"type":"string","maxLength":200,"nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"helpText":{"type":"string","maxLength":2000},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"],"default":"pass_fail_na"},"isCritical":{"type":"boolean","default":false},"autoCreateWorkOrder":{"type":"boolean","default":true},"workOrderCategory":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"workOrderPriority":{"type":"string","enum":["low","normal","high","urgent"],"default":"high"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"unit":{"type":"string","maxLength":20},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false},"minItems":2,"maxItems":12},"sectionLabel":{"type":"string","maxLength":100},"weight":{"type":"integer","minimum":0,"maximum":100,"default":1},"isRequired":{"type":"boolean","default":true},"requiresPhoto":{"type":"boolean","default":false}},"required":["prompt"],"additionalProperties":false},"minItems":1,"maxItems":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","nullable":true},"leadTimeDays":{"type":"integer"},"regulatoryCitation":{"type":"string","nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"itemCount":{"type":"integer","minimum":0},"openInspectionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"position":{"type":"integer"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"]},"isCritical":{"type":"boolean"},"autoCreateWorkOrder":{"type":"boolean"},"workOrderCategory":{"type":"string","nullable":true},"workOrderPriority":{"type":"string"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"}},"required":["id","templateId","position","prompt","helpText","inputType","isCritical","autoCreateWorkOrder","workOrderCategory","workOrderPriority","minValue","maxValue","unit","options","sectionLabel","weight","isRequired","requiresPhoto"],"additionalProperties":false}}},"required":["id","districtId","name","code","description","category","frequency","intervalDays","leadTimeDays","regulatoryCitation","producesCertificate","requiresExternalInspector","isActive","createdAt","updatedAt","deletedAt","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-templates/{id}/retire":{"post":{"summary":"Retire a template (refuses while inspections against it are open)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"frequency":{"type":"string","enum":["none","weekly","monthly","quarterly","semiannual","annual","biennial","custom"]},"intervalDays":{"type":"integer","nullable":true},"leadTimeDays":{"type":"integer"},"regulatoryCitation":{"type":"string","nullable":true},"producesCertificate":{"type":"boolean"},"requiresExternalInspector":{"type":"boolean"},"isActive":{"type":"boolean"},"itemCount":{"type":"integer","minimum":0},"openInspectionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"position":{"type":"integer"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"inputType":{"type":"string","enum":["pass_fail","pass_fail_na","yes_no","yes_no_na","yes_no_unable","select","multi_select","numeric","text","photo","signature"]},"isCritical":{"type":"boolean"},"autoCreateWorkOrder":{"type":"boolean"},"workOrderCategory":{"type":"string","nullable":true},"workOrderPriority":{"type":"string"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"}},"required":["id","templateId","position","prompt","helpText","inputType","isCritical","autoCreateWorkOrder","workOrderCategory","workOrderPriority","minValue","maxValue","unit","options","sectionLabel","weight","isRequired","requiresPhoto"],"additionalProperties":false}}},"required":["id","districtId","name","code","description","category","frequency","intervalDays","leadTimeDays","regulatoryCitation","producesCertificate","requiresExternalInspector","isActive","createdAt","updatedAt","deletedAt","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections":{"get":{"summary":"List inspections (scoped to the buildings you cover)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"templateId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["fire","boiler","elevator","backflow","playground","air_quality","ada","roof","electrical","kitchen","security","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"overdueOnly","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"openOnly","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeCancelled","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"withTotal","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"total":{"type":"integer"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule an inspection (emits InspectionScheduled)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time"},"inspectorPersonId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"externalInspectorName":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":5000}},"required":["templateId","scheduledFor"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections/{id}":{"get":{"summary":"Get an inspection with its checklist answers","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Reschedule or reassign an inspection","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","maxLength":200,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections/{id}/start":{"post":{"summary":"Begin working through the checklist","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections/{id}/results":{"post":{"summary":"Record or update checklist answers","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"templateItemId":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["pass","fail","na"]},"optionKey":{"type":"string","maxLength":40},"optionKeys":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":50},"value":{"type":"number"},"notes":{"type":"string","maxLength":2000},"photoKeys":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20}},"required":["templateItemId"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["results"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections/{id}/complete":{"post":{"summary":"Complete an inspection; failed lines spawn work orders","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":5000},"createWorkOrders":{"type":"boolean","default":true},"certificate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"certificateNumber":{"type":"string","maxLength":100},"issuingAuthority":{"type":"string","maxLength":200},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time"},"documentKey":{"type":"string","maxLength":500}},"required":["name","issuedOn"],"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"inspection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"spawnedWorkOrderIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certificateId":{"type":"string","format":"uuid","nullable":true}},"required":["inspection","spawnedWorkOrderIds","certificateId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspections/{id}/cancel":{"post":{"summary":"Cancel a scheduled inspection","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-certificates":{"get":{"summary":"List certificates and permits (use expiringWithinDays for renewals)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":0,"maximum":3650},"in":"query","name":"expiringWithinDays","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"includeExpired","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"certificateNumber":{"type":"string","nullable":true},"issuingAuthority":{"type":"string","nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"documentKey":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"daysUntilExpiry":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","inspectionId","buildingId","buildingName","name","certificateNumber","issuingAuthority","issuedOn","expiresOn","documentKey","notes","status","daysUntilExpiry","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"File a certificate or permit (emits InspectionCertificateRecorded)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"buildingId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid"},"certificateNumber":{"type":"string","maxLength":100},"issuingAuthority":{"type":"string","maxLength":200},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time"},"documentKey":{"type":"string","maxLength":500},"notes":{"type":"string","maxLength":5000}},"required":["name","issuedOn"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"certificateNumber":{"type":"string","nullable":true},"issuingAuthority":{"type":"string","nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"documentKey":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"daysUntilExpiry":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","inspectionId","buildingId","buildingName","name","certificateNumber","issuingAuthority","issuedOn","expiresOn","documentKey","notes","status","daysUntilExpiry","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-certificates/{id}":{"get":{"summary":"Get a certificate","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"certificateNumber":{"type":"string","nullable":true},"issuingAuthority":{"type":"string","nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"documentKey":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"daysUntilExpiry":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","inspectionId","buildingId","buildingName","name","certificateNumber","issuingAuthority","issuedOn","expiresOn","documentKey","notes","status","daysUntilExpiry","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Correct a filed certificate, including its expiry","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"certificateNumber":{"type":"string","maxLength":100,"nullable":true},"issuingAuthority":{"type":"string","maxLength":200,"nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"certificateNumber":{"type":"string","nullable":true},"issuingAuthority":{"type":"string","nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"documentKey":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"daysUntilExpiry":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","inspectionId","buildingId","buildingName","name","certificateNumber","issuingAuthority","issuedOn","expiresOn","documentKey","notes","status","daysUntilExpiry","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/inspection-certificates/{id}/retire":{"post":{"summary":"Retire a certificate filed in error","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"inspectionId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"certificateNumber":{"type":"string","nullable":true},"issuingAuthority":{"type":"string","nullable":true},"issuedOn":{"type":"string","format":"date-time"},"expiresOn":{"type":"string","format":"date-time","nullable":true},"documentKey":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"status":{"type":"string"},"daysUntilExpiry":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","inspectionId","buildingId","buildingName","name","certificateNumber","issuingAuthority","issuedOn","expiresOn","documentKey","notes","status","daysUntilExpiry","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-workers":{"get":{"summary":"List the checklist roster","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"kioskOnly","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a worker to the checklist roster (emits ChecklistWorkerRegistered)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":120},"crewRole":{"type":"string","enum":["crew","lead","supervisor"],"default":"crew"},"userId":{"type":"string","maxLength":191},"personId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"kioskPin":{"type":"string","minLength":4,"maxLength":8}},"required":["displayName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-workers/{id}":{"get":{"summary":"Get one checklist worker","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a worker, set or clear their kiosk PIN","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":120},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"userId":{"type":"string","maxLength":191,"nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"kioskPin":{"type":"string","minLength":4,"maxLength":8,"nullable":true},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-workers/{id}/deactivate":{"post":{"summary":"Retire a worker (refuses while assignments still name them)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-assignments":{"get":{"summary":"List standing checklist assignments","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"workerId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"templateId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeEnded","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"roomName":{"type":"string","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer"},"nullable":true},"startsAtLocal":{"type":"string"},"dueAtLocal":{"type":"string"},"timezone":{"type":"string"},"startsOn":{"type":"string"},"endsOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"assignedByUserId":{"type":"string"},"lastGeneratedOn":{"type":"string","nullable":true},"nextOccurrence":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","roomName","cadence","daysOfWeek","startsAtLocal","dueAtLocal","timezone","startsOn","endsOn","isActive","notes","assignedByUserId","lastGeneratedOn","nextOccurrence","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Assign a recurring checklist to a worker or a crew","tags":["Facilities"],"description":"Pass `buildingIds` to assign the same checklist across many schools in one action. Returns one assignment per building. Emits ChecklistAssigned for each.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"teamId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100},"roomId":{"type":"string","format":"uuid"},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"],"default":"weekdays"},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":31},"minItems":1,"maxItems":31},"startsAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$","default":"06:00"},"dueAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$","default":"17:00"},"timezone":{"type":"string","minLength":1,"maxLength":64,"default":"America/New_York"},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":500}},"required":["templateId","startsOn"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"roomName":{"type":"string","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer"},"nullable":true},"startsAtLocal":{"type":"string"},"dueAtLocal":{"type":"string"},"timezone":{"type":"string"},"startsOn":{"type":"string"},"endsOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"assignedByUserId":{"type":"string"},"lastGeneratedOn":{"type":"string","nullable":true},"nextOccurrence":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","roomName","cadence","daysOfWeek","startsAtLocal","dueAtLocal","timezone","startsOn","endsOn","isActive","notes","assignedByUserId","lastGeneratedOn","nextOccurrence","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-assignments/{id}":{"get":{"summary":"Get one standing assignment","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"roomName":{"type":"string","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer"},"nullable":true},"startsAtLocal":{"type":"string"},"dueAtLocal":{"type":"string"},"timezone":{"type":"string"},"startsOn":{"type":"string"},"endsOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"assignedByUserId":{"type":"string"},"lastGeneratedOn":{"type":"string","nullable":true},"nextOccurrence":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","roomName","cadence","daysOfWeek","startsAtLocal","dueAtLocal","timezone","startsOn","endsOn","isActive","notes","assignedByUserId","lastGeneratedOn","nextOccurrence","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Reassign, reschedule, or pause a standing assignment","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":31},"minItems":1,"maxItems":31,"nullable":true},"startsAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"dueAtLocal":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"timezone":{"type":"string","minLength":1,"maxLength":64},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"roomName":{"type":"string","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer"},"nullable":true},"startsAtLocal":{"type":"string"},"dueAtLocal":{"type":"string"},"timezone":{"type":"string"},"startsOn":{"type":"string"},"endsOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"assignedByUserId":{"type":"string"},"lastGeneratedOn":{"type":"string","nullable":true},"nextOccurrence":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","roomName","cadence","daysOfWeek","startsAtLocal","dueAtLocal","timezone","startsOn","endsOn","isActive","notes","assignedByUserId","lastGeneratedOn","nextOccurrence","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-assignments/{id}/end":{"post":{"summary":"End a standing assignment; already-generated checklists are kept","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"roomName":{"type":"string","nullable":true},"cadence":{"type":"string","enum":["daily","weekdays","weekly","monthly","once"]},"daysOfWeek":{"type":"array","items":{"type":"integer"},"nullable":true},"startsAtLocal":{"type":"string"},"dueAtLocal":{"type":"string"},"timezone":{"type":"string"},"startsOn":{"type":"string"},"endsOn":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"assignedByUserId":{"type":"string"},"lastGeneratedOn":{"type":"string","nullable":true},"nextOccurrence":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","roomName","cadence","daysOfWeek","startsAtLocal","dueAtLocal","timezone","startsOn","endsOn","isActive","notes","assignedByUserId","lastGeneratedOn","nextOccurrence","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/dashboard":{"get":{"summary":"Checklist compliance by person: done, late, missed, score","tags":["Facilities"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"templateId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"people":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"assigned":{"type":"integer","minimum":0},"submitted":{"type":"integer","minimum":0},"late":{"type":"integer","minimum":0},"missed":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"completionPct":{"type":"number","nullable":true},"onTimePct":{"type":"number","nullable":true},"avgScorePct":{"type":"number","nullable":true},"deficiencies":{"type":"integer","minimum":0},"workOrdersRaised":{"type":"integer","minimum":0},"lastSubmittedAt":{"type":"string","format":"date-time","nullable":true}},"required":["workerId","displayName","crewRole","buildingId","buildingName","assigned","submitted","late","missed","open","completionPct","onTimePct","avgScorePct","deficiencies","workOrdersRaised","lastSubmittedAt"],"additionalProperties":false}},"teams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"memberCount":{"type":"integer","minimum":0},"assigned":{"type":"integer","minimum":0},"submitted":{"type":"integer","minimum":0},"late":{"type":"integer","minimum":0},"missed":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"unclaimed":{"type":"integer","minimum":0},"completionPct":{"type":"number","nullable":true},"onTimePct":{"type":"number","nullable":true},"avgScorePct":{"type":"number","nullable":true},"deficiencies":{"type":"integer","minimum":0}},"required":["teamId","name","buildingId","buildingName","memberCount","assigned","submitted","late","missed","open","unclaimed","completionPct","onTimePct","avgScorePct","deficiencies"],"additionalProperties":false}},"totals":{"type":"object","properties":{"assigned":{"type":"integer","minimum":0},"submitted":{"type":"integer","minimum":0},"late":{"type":"integer","minimum":0},"missed":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"completionPct":{"type":"number","nullable":true},"onTimePct":{"type":"number","nullable":true},"avgScorePct":{"type":"number","nullable":true},"deficiencies":{"type":"integer","minimum":0},"workOrdersRaised":{"type":"integer","minimum":0}},"required":["assigned","submitted","late","missed","open","completionPct","onTimePct","avgScorePct","deficiencies","workOrdersRaised"],"additionalProperties":false}},"required":["from","to","people","teams","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/my-day":{"get":{"summary":"A worker's checklists for one service day","tags":["Facilities"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"date","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"workerId","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"includeSubmitted","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"serviceDate":{"type":"string"},"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"referenceNumber":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"serviceDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","missed","cancelled"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"scorePct":{"type":"number","nullable":true},"isLate":{"type":"boolean"}},"required":["id","referenceNumber","assignmentId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","serviceDate","status","scheduledFor","dueAt","startedAt","completedAt","itemsTotal","itemsPassed","itemsFailed","scorePct","isLate"],"additionalProperties":false}},"openCount":{"type":"integer","minimum":0},"lateCount":{"type":"integer","minimum":0}},"required":["serviceDate","worker","runs","openCount","lateCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists":{"get":{"summary":"Checklist history, filterable by worker, building, and date","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"workerId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"assignmentId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","missed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"referenceNumber":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"teamId":{"type":"string","format":"uuid","nullable":true},"teamName":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"serviceDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","missed","cancelled"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"scorePct":{"type":"number","nullable":true},"isLate":{"type":"boolean"}},"required":["id","referenceNumber","assignmentId","templateId","templateName","workerId","workerName","teamId","teamName","buildingId","buildingName","roomId","serviceDate","status","scheduledFor","dueAt","startedAt","completedAt","itemsTotal","itemsPassed","itemsFailed","scorePct","isLate"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/{id}":{"get":{"summary":"One checklist with every question and answer, ready to fill out","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/{id}/start":{"post":{"summary":"Begin a checklist; claims it when a crew owes it","tags":["Facilities"],"description":"On a crew checklist nobody has picked up, this stamps the worker who did. Pass `workerId` from a kiosk, where the signed-in account is the tablet rather than the person.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/{id}/results":{"post":{"summary":"Save answers as the worker goes; safe to call repeatedly","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"templateItemId":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["pass","fail","na"]},"optionKey":{"type":"string","maxLength":40},"optionKeys":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":50},"value":{"type":"number"},"notes":{"type":"string","maxLength":2000},"photoKeys":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20}},"required":["templateItemId"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["results"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/{id}/submit":{"post":{"summary":"File the checklist; failed lines spawn work orders","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"inspection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"templateName":{"type":"string"},"templateCategory":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"referenceNumber":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","passed","passed_with_deficiencies","failed","cancelled","overdue","missed"]},"scheduledFor":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"inspectorPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"externalInspectorName":{"type":"string","nullable":true},"itemsTotal":{"type":"integer"},"itemsPassed":{"type":"integer"},"itemsFailed":{"type":"integer"},"notes":{"type":"string","nullable":true},"cancelledReason":{"type":"string","nullable":true},"generatedFromRecurrence":{"type":"boolean"},"createdByUserId":{"type":"string"},"assignmentId":{"type":"string","format":"uuid","nullable":true},"workerId":{"type":"string","format":"uuid","nullable":true},"workerName":{"type":"string","nullable":true},"serviceDate":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"submittedByUserId":{"type":"string","nullable":true},"isOverdue":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateItemId":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"position":{"type":"integer"},"inputType":{"type":"string"},"isCritical":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["pass","fail","na"]},"tone":{"type":"string","enum":["positive","negative","caution","neutral"],"default":"neutral"},"requiresNote":{"type":"boolean","default":false},"requiresPhoto":{"type":"boolean","default":false}},"required":["key","label","outcome"],"additionalProperties":false}},"sectionLabel":{"type":"string","nullable":true},"weight":{"type":"integer"},"isRequired":{"type":"boolean"},"requiresPhoto":{"type":"boolean"},"minValue":{"type":"number","nullable":true},"maxValue":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"outcome":{"type":"string","enum":["pass","fail","na"],"nullable":true},"optionKey":{"type":"string","nullable":true},"optionKeys":{"type":"array","items":{"type":"string"}},"value":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"photoKeys":{"type":"array","items":{"type":"string"}},"workOrderId":{"type":"string","format":"uuid","nullable":true}},"required":["id","templateItemId","prompt","helpText","position","inputType","isCritical","options","sectionLabel","weight","isRequired","requiresPhoto","minValue","maxValue","unit","outcome","optionKey","optionKeys","value","notes","photoKeys","workOrderId"],"additionalProperties":false}}},"required":["id","districtId","templateId","buildingId","buildingName","roomId","assetId","referenceNumber","status","scheduledFor","dueAt","startedAt","completedAt","inspectorPersonId","vendorId","externalInspectorName","itemsTotal","itemsPassed","itemsFailed","notes","cancelledReason","generatedFromRecurrence","createdByUserId","assignmentId","workerId","workerName","serviceDate","scorePct","submittedByUserId","createdAt","updatedAt","deletedAt","results"],"additionalProperties":false},"spawnedWorkOrderIds":{"type":"array","items":{"type":"string","format":"uuid"}},"certificateId":{"type":"string","format":"uuid","nullable":true}},"required":["inspection","spawnedWorkOrderIds","certificateId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/kiosk/workers":{"get":{"summary":"Crew on a shared tablet, with what each still owes today","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"date","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"openCount":{"type":"integer","minimum":0},"lateCount":{"type":"integer","minimum":0}},"required":["id","displayName","crewRole","openCount","lateCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklists/kiosk/verify-pin":{"post":{"summary":"Confirm which worker on a shared tablet is filing","tags":["Facilities"],"description":"Attribution, not authentication — the tablet is already signed in as a district kiosk account. Rate limited per worker.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"pin":{"type":"string","minLength":4,"maxLength":8}},"required":["workerId","pin"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"verified":{"type":"boolean"},"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"userId":{"type":"string","nullable":true},"personId":{"type":"string","format":"uuid","nullable":true},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"hasKioskPin":{"type":"boolean"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","userId","personId","displayName","crewRole","buildingId","buildingName","hasKioskPin","isActive","lastSeenAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"viaMasterPin":{"type":"boolean"},"sessionSeconds":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["verified","worker","viaMasterPin","sessionSeconds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-teams":{"get":{"summary":"List crews","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"workerId","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"leadName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"isLead":{"type":"boolean"},"hasKioskPin":{"type":"boolean"}},"required":["workerId","displayName","crewRole","isLead","hasKioskPin"],"additionalProperties":false}},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","buildingId","buildingName","leadWorkerId","leadName","notes","isActive","members","activeAssignmentCount","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a crew (emits ChecklistTeamCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"buildingId":{"type":"string","format":"uuid"},"leadWorkerId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":500},"workerIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":200}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"leadName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"isLead":{"type":"boolean"},"hasKioskPin":{"type":"boolean"}},"required":["workerId","displayName","crewRole","isLead","hasKioskPin"],"additionalProperties":false}},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","buildingId","buildingName","leadWorkerId","leadName","notes","isActive","members","activeAssignmentCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-teams/{id}":{"get":{"summary":"Get one crew with its roster","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"leadName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"isLead":{"type":"boolean"},"hasKioskPin":{"type":"boolean"}},"required":["workerId","displayName","crewRole","isLead","hasKioskPin"],"additionalProperties":false}},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","buildingId","buildingName","leadWorkerId","leadName","notes","isActive","members","activeAssignmentCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename a crew, move it, or replace its roster","tags":["Facilities"],"description":"Sending `workerIds` replaces the whole roster.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"buildingId":{"type":"string","format":"uuid","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":500,"nullable":true},"isActive":{"type":"boolean"},"workerIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"leadName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"isLead":{"type":"boolean"},"hasKioskPin":{"type":"boolean"}},"required":["workerId","displayName","crewRole","isLead","hasKioskPin"],"additionalProperties":false}},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","buildingId","buildingName","leadWorkerId","leadName","notes","isActive","members","activeAssignmentCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/checklist-teams/{id}/deactivate":{"post":{"summary":"Retire a crew (refuses while assignments still point at it)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"leadWorkerId":{"type":"string","format":"uuid","nullable":true},"leadName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"crewRole":{"type":"string","enum":["crew","lead","supervisor"]},"isLead":{"type":"boolean"},"hasKioskPin":{"type":"boolean"}},"required":["workerId","displayName","crewRole","isLead","hasKioskPin"],"additionalProperties":false}},"activeAssignmentCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","name","buildingId","buildingName","leadWorkerId","leadName","notes","isActive","members","activeAssignmentCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/quality-trends":{"get":{"summary":"Quality score trends, building rankings, declining areas, inspector analytics","tags":["Facilities"],"parameters":[{"schema":{"type":"integer","minimum":4,"maximum":26,"default":8},"in":"query","name":"weeks","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"weekly":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string"},"avgScorePct":{"type":"number","nullable":true},"completionPct":{"type":"number","nullable":true},"submitted":{"type":"integer"},"assigned":{"type":"integer"},"deficiencies":{"type":"integer"}},"required":["weekStart","avgScorePct","completionPct","submitted","assigned","deficiencies"],"additionalProperties":false}},"buildings":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string"},"name":{"type":"string"},"avgScorePct":{"type":"number","nullable":true},"prevAvgScorePct":{"type":"number","nullable":true},"delta":{"type":"number","nullable":true},"submitted":{"type":"integer"},"deficiencies":{"type":"integer"}},"required":["buildingId","name","avgScorePct","prevAvgScorePct","delta","submitted","deficiencies"],"additionalProperties":false}},"attention":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string"},"name":{"type":"string"},"weeklyScores":{"type":"array","items":{"type":"number"}},"message":{"type":"string"}},"required":["buildingId","name","weeklyScores","message"],"additionalProperties":false}},"inspectors":{"type":"array","items":{"type":"object","properties":{"workerId":{"type":"string"},"name":{"type":"string"},"submitted":{"type":"integer"},"avgScorePct":{"type":"number","nullable":true},"deficienciesFound":{"type":"integer"}},"required":["workerId","name","submitted","avgScorePct","deficienciesFound"],"additionalProperties":false}}},"required":["from","weekly","buildings","attention","inspectors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/quality-report/send-now":{"post":{"summary":"Queue the weekly quality report email immediately","tags":["Facilities"],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-orders/{workOrderId}/costs":{"get":{"summary":"List cost lines on a work order, with live totals","tags":["Facilities"],"parameters":[{"schema":{"type":"string","enum":["labor","parts","contract","equipment","other"]},"in":"query","name":"costType","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"vendorId","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRemoved","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workOrderId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"workOrderId":{"type":"string","format":"uuid"},"costType":{"type":"string","enum":["labor","parts","contract","equipment","other"]},"description":{"type":"string"},"hours":{"type":"number","nullable":true},"hourlyRateCents":{"type":"integer","nullable":true},"quantity":{"type":"number","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"amountCents":{"type":"integer"},"personId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorName":{"type":"string","nullable":true},"purchaseOrderId":{"type":"string","format":"uuid","nullable":true},"purchaseOrderNumber":{"type":"string","nullable":true},"vendorInvoiceId":{"type":"string","format":"uuid","nullable":true},"vendorInvoiceNumber":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"incurredOn":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","workOrderId","costType","description","hours","hourlyRateCents","quantity","unitCostCents","amountCents","personId","vendorId","vendorName","purchaseOrderId","purchaseOrderNumber","vendorInvoiceId","vendorInvoiceNumber","budgetAccountId","budgetAccountCode","incurredOn","notes","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"totals":{"type":"object","properties":{"totalCents":{"type":"integer"},"byType":{"type":"object","additionalProperties":{"type":"integer"}},"lineCount":{"type":"integer"}},"required":["totalCents","byType","lineCount"],"additionalProperties":false},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","totals","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Post a labor, parts, or contract cost against a work order","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costType":{"type":"string","enum":["labor","parts","contract","equipment","other"]},"description":{"type":"string","minLength":1,"maxLength":300},"hours":{"type":"number","minimum":0,"maximum":10000},"hourlyRateCents":{"type":"integer","minimum":0,"maximum":100000000},"quantity":{"type":"number","minimum":0,"maximum":1000000},"unitCostCents":{"type":"integer","minimum":0,"maximum":100000000},"amountCents":{"type":"integer","minimum":0,"maximum":1000000000},"personId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"vendorInvoiceId":{"type":"string","format":"uuid"},"budgetAccountId":{"type":"string","format":"uuid"},"incurredOn":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":5000}},"required":["costType","description","incurredOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workOrderId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"workOrderId":{"type":"string","format":"uuid"},"costType":{"type":"string","enum":["labor","parts","contract","equipment","other"]},"description":{"type":"string"},"hours":{"type":"number","nullable":true},"hourlyRateCents":{"type":"integer","nullable":true},"quantity":{"type":"number","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"amountCents":{"type":"integer"},"personId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorName":{"type":"string","nullable":true},"purchaseOrderId":{"type":"string","format":"uuid","nullable":true},"purchaseOrderNumber":{"type":"string","nullable":true},"vendorInvoiceId":{"type":"string","format":"uuid","nullable":true},"vendorInvoiceNumber":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"incurredOn":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","workOrderId","costType","description","hours","hourlyRateCents","quantity","unitCostCents","amountCents","personId","vendorId","vendorName","purchaseOrderId","purchaseOrderNumber","vendorInvoiceId","vendorInvoiceNumber","budgetAccountId","budgetAccountCode","incurredOn","notes","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/work-order-costs/{id}/remove":{"post":{"summary":"Remove a cost line (soft delete; re-syncs the ticket total)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"workOrderId":{"type":"string","format":"uuid"},"costType":{"type":"string","enum":["labor","parts","contract","equipment","other"]},"description":{"type":"string"},"hours":{"type":"number","nullable":true},"hourlyRateCents":{"type":"integer","nullable":true},"quantity":{"type":"number","nullable":true},"unitCostCents":{"type":"integer","nullable":true},"amountCents":{"type":"integer"},"personId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorName":{"type":"string","nullable":true},"purchaseOrderId":{"type":"string","format":"uuid","nullable":true},"purchaseOrderNumber":{"type":"string","nullable":true},"vendorInvoiceId":{"type":"string","format":"uuid","nullable":true},"vendorInvoiceNumber":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"budgetAccountCode":{"type":"string","nullable":true},"incurredOn":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","workOrderId","costType","description","hours","hourlyRateCents","quantity","unitCostCents","amountCents","personId","vendorId","vendorName","purchaseOrderId","purchaseOrderNumber","vendorInvoiceId","vendorInvoiceNumber","budgetAccountId","budgetAccountCode","incurredOn","notes","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/cost-summary":{"get":{"summary":"Cost roll-up by building, with cost per square foot","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"buildings":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string"},"squareFeet":{"type":"integer","nullable":true},"workOrderCount":{"type":"integer"},"totalCents":{"type":"integer"},"laborCents":{"type":"integer"},"partsCents":{"type":"integer"},"contractCents":{"type":"integer"},"otherCents":{"type":"integer"},"costPerSquareFootCents":{"type":"number","nullable":true}},"required":["buildingId","buildingName","squareFeet","workOrderCount","totalCents","laborCents","partsCents","contractCents","otherCents","costPerSquareFootCents"],"additionalProperties":false}},"totals":{"type":"object","properties":{"totalCents":{"type":"integer"},"laborCents":{"type":"integer"},"partsCents":{"type":"integer"},"contractCents":{"type":"integer"},"otherCents":{"type":"integer"},"workOrderCount":{"type":"integer"},"squareFeet":{"type":"integer"},"costPerSquareFootCents":{"type":"number","nullable":true}},"required":["totalCents","laborCents","partsCents","contractCents","otherCents","workOrderCount","squareFeet","costPerSquareFootCents"],"additionalProperties":false},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"totalCents":{"type":"integer"},"workOrderCount":{"type":"integer"}},"required":["category","totalCents","workOrderCount"],"additionalProperties":false}}},"required":["buildings","totals","byCategory"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/invoices":{"get":{"summary":"Vendor invoices reachable through your work-order costs (read-only)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"vendorId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoiceNumber":{"type":"string"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string","nullable":true},"purchaseOrderId":{"type":"string","format":"uuid","nullable":true},"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time","nullable":true},"amountCents":{"type":"integer"},"status":{"type":"string"},"accountCode":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"paidAt":{"type":"string","format":"date-time","nullable":true},"workOrders":{"type":"array","items":{"type":"object","properties":{"workOrderId":{"type":"string","format":"uuid"},"ticketNumber":{"type":"string"},"title":{"type":"string"},"amountCents":{"type":"integer"}},"required":["workOrderId","ticketNumber","title","amountCents"],"additionalProperties":false}}},"required":["id","invoiceNumber","vendorId","vendorName","purchaseOrderId","invoiceDate","dueDate","amountCents","status","accountCode","memo","paidAt","workOrders"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/building-conditions":{"get":{"summary":"List condition assessments (latestPerBuilding for the current picture)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"latestPerBuilding","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string","nullable":true},"assessedOn":{"type":"string","format":"date-time"},"replacementValue":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"deficiencyCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["good","fair","poor","critical"],"nullable":true},"systemRatings":{"type":"object","additionalProperties":{"type":"number"},"nullable":true},"remainingUsefulLifeYears":{"type":"integer","nullable":true},"assessedByPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"methodology":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"documentKey":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","buildingId","buildingName","assessedOn","replacementValue","deficiencyCost","facilityConditionIndex","conditionRating","systemRatings","remainingUsefulLifeYears","assessedByPersonId","vendorId","methodology","notes","documentKey","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"File a condition assessment (emits BuildingConditionAssessed)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"assessedOn":{"type":"string","format":"date-time"},"replacementValue":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"deficiencyCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"systemRatings":{"type":"object","additionalProperties":{"type":"number","minimum":1,"maximum":5}},"remainingUsefulLifeYears":{"type":"integer","minimum":0,"maximum":200},"assessedByPersonId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"methodology":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":5000},"documentKey":{"type":"string","maxLength":500}},"required":["buildingId","assessedOn","replacementValue","deficiencyCost"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string","nullable":true},"assessedOn":{"type":"string","format":"date-time"},"replacementValue":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"deficiencyCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["good","fair","poor","critical"],"nullable":true},"systemRatings":{"type":"object","additionalProperties":{"type":"number"},"nullable":true},"remainingUsefulLifeYears":{"type":"integer","nullable":true},"assessedByPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"methodology":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"documentKey":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","buildingId","buildingName","assessedOn","replacementValue","deficiencyCost","facilityConditionIndex","conditionRating","systemRatings","remainingUsefulLifeYears","assessedByPersonId","vendorId","methodology","notes","documentKey","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/building-conditions/{id}":{"get":{"summary":"Get a condition assessment with its Facility Condition Index","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string","nullable":true},"assessedOn":{"type":"string","format":"date-time"},"replacementValue":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"deficiencyCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["good","fair","poor","critical"],"nullable":true},"systemRatings":{"type":"object","additionalProperties":{"type":"number"},"nullable":true},"remainingUsefulLifeYears":{"type":"integer","nullable":true},"assessedByPersonId":{"type":"string","format":"uuid","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"methodology":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"documentKey":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","buildingId","buildingName","assessedOn","replacementValue","deficiencyCost","facilityConditionIndex","conditionRating","systemRatings","remainingUsefulLifeYears","assessedByPersonId","vendorId","methodology","notes","documentKey","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/capital-projects":{"get":{"summary":"List capital projects","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"integer","minimum":1,"maximum":5},"in":"query","name":"maxPriority","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeCancelled","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"priority":{"type":"integer"},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer"},"fundingSource":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"buildingConditionId":{"type":"string","format":"uuid","nullable":true},"sourceInspectionId":{"type":"string","format":"uuid","nullable":true},"approvedOn":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"totalPlanned":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","buildingId","buildingName","name","code","description","category","status","priority","estimatedCost","actualCost","startFiscalYear","fundingSource","budgetAccountId","buildingConditionId","sourceInspectionId","approvedOn","approvedByUserId","completedOn","notes","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a capital project (emits CapitalProjectCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","maxLength":5000},"buildingId":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"],"default":"other"},"priority":{"type":"integer","minimum":1,"maximum":5,"default":3},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"startFiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"fundingSource":{"type":"string","enum":["bond","referendum","capital_reserve","grant","operating","esser","other"]},"budgetAccountId":{"type":"string","format":"uuid"},"buildingConditionId":{"type":"string","format":"uuid"},"sourceInspectionId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":5000},"planYears":{"type":"array","items":{"type":"object","properties":{"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"notes":{"type":"string","maxLength":500}},"required":["fiscalYear","plannedAmount"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["name","code","estimatedCost","startFiscalYear"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"priority":{"type":"integer"},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer"},"fundingSource":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"buildingConditionId":{"type":"string","format":"uuid","nullable":true},"sourceInspectionId":{"type":"string","format":"uuid","nullable":true},"approvedOn":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"totalPlanned":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"planYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer"},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fiscalYear","plannedAmount","approvedAmount","actualAmount","notes"],"additionalProperties":false}}},"required":["id","districtId","buildingId","buildingName","name","code","description","category","status","priority","estimatedCost","actualCost","startFiscalYear","fundingSource","budgetAccountId","buildingConditionId","sourceInspectionId","approvedOn","approvedByUserId","completedOn","notes","createdByUserId","createdAt","updatedAt","deletedAt","planYears"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/capital-projects/{id}":{"get":{"summary":"Get a capital project with its multi-year funding spread","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"priority":{"type":"integer"},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer"},"fundingSource":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"buildingConditionId":{"type":"string","format":"uuid","nullable":true},"sourceInspectionId":{"type":"string","format":"uuid","nullable":true},"approvedOn":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"totalPlanned":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"planYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer"},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fiscalYear","plannedAmount","approvedAmount","actualAmount","notes"],"additionalProperties":false}}},"required":["id","districtId","buildingId","buildingName","name","code","description","category","status","priority","estimatedCost","actualCost","startFiscalYear","fundingSource","budgetAccountId","buildingConditionId","sourceInspectionId","approvedOn","approvedByUserId","completedOn","notes","createdByUserId","createdAt","updatedAt","deletedAt","planYears"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a project; sending planYears replaces the funding spread","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"priority":{"type":"integer","minimum":1,"maximum":5},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"fundingSource":{"type":"string","enum":["bond","referendum","capital_reserve","grant","operating","esser","other"],"nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"planYears":{"type":"array","items":{"type":"object","properties":{"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"notes":{"type":"string","maxLength":500}},"required":["fiscalYear","plannedAmount"],"additionalProperties":false},"maxItems":20}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"priority":{"type":"integer"},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer"},"fundingSource":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"buildingConditionId":{"type":"string","format":"uuid","nullable":true},"sourceInspectionId":{"type":"string","format":"uuid","nullable":true},"approvedOn":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"totalPlanned":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"planYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer"},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fiscalYear","plannedAmount","approvedAmount","actualAmount","notes"],"additionalProperties":false}}},"required":["id","districtId","buildingId","buildingName","name","code","description","category","status","priority","estimatedCost","actualCost","startFiscalYear","fundingSource","budgetAccountId","buildingConditionId","sourceInspectionId","approvedOn","approvedByUserId","completedOn","notes","createdByUserId","createdAt","updatedAt","deletedAt","planYears"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/capital-projects/{id}/status":{"post":{"summary":"Move a project between proposed / approved / funded / complete","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"reason":{"type":"string","maxLength":500}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string","nullable":true},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["roof","hvac","electrical","plumbing","structural","ada","security","technology","grounds","energy","other"]},"status":{"type":"string","enum":["proposed","approved","funded","in_progress","complete","deferred","cancelled"]},"priority":{"type":"integer"},"estimatedCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"actualCost":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"startFiscalYear":{"type":"integer"},"fundingSource":{"type":"string","nullable":true},"budgetAccountId":{"type":"string","format":"uuid","nullable":true},"buildingConditionId":{"type":"string","format":"uuid","nullable":true},"sourceInspectionId":{"type":"string","format":"uuid","nullable":true},"approvedOn":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string"},"totalPlanned":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"planYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fiscalYear":{"type":"integer"},"plannedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"approvedAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"actualAmount":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","fiscalYear","plannedAmount","approvedAmount","actualAmount","notes"],"additionalProperties":false}}},"required":["id","districtId","buildingId","buildingName","name","code","description","category","status","priority","estimatedCost","actualCost","startFiscalYear","fundingSource","budgetAccountId","buildingConditionId","sourceInspectionId","approvedOn","approvedByUserId","completedOn","notes","createdByUserId","createdAt","updatedAt","deletedAt","planYears"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/capital-plan":{"get":{"summary":"Multi-year capital plan with per-building Facility Condition Index","tags":["Facilities"],"parameters":[{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"startFiscalYear","required":true},{"schema":{"type":"integer","minimum":1,"maximum":10,"default":5},"in":"query","name":"years","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"boolean","default":true},"in":"query","name":"includeDeferred","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fiscalYears":{"type":"array","items":{"type":"integer"}},"rows":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"buildingName":{"type":"string","nullable":true},"category":{"type":"string"},"status":{"type":"string"},"priority":{"type":"integer"},"amounts":{"type":"array","items":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"}},"total":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"}},"required":["projectId","code","name","buildingName","category","status","priority","amounts","total"],"additionalProperties":false}},"yearTotals":{"type":"array","items":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"}},"grandTotal":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$"},"conditionByBuilding":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","nullable":true},"assessedOn":{"type":"string","format":"date-time","nullable":true}},"required":["buildingId","buildingName","facilityConditionIndex","conditionRating","assessedOn"],"additionalProperties":false}}},"required":["fiscalYears","rows","yearTotals","grandTotal","conditionByBuilding"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-review-questions":{"get":{"summary":"List the year-end review checklist","tags":["Facilities"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"}},"required":["id","section","prompt","helpText","answerType","position"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save the year-end review checklist (emits FacilityReviewQuestionsUpdated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string","minLength":1,"maxLength":100},"prompt":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":500,"nullable":true},"answerType":{"type":"string","enum":["condition","text","number","currency","date"],"default":"condition"}},"required":["section","prompt"],"additionalProperties":false},"minItems":1,"maxItems":400}},"required":["questions"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"}},"required":["id","section","prompt","helpText","answerType","position"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-review-questions/load-standard":{"post":{"summary":"Load the standard FCA questions into an empty checklist","tags":["Facilities"],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"}},"required":["id","section","prompt","helpText","answerType","position"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews":{"get":{"summary":"List year-end facility reviews","tags":["Facilities"],"parameters":[{"schema":{"type":"string","enum":["draft","published"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a year-end facility review (emits FacilityReviewStarted)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"schoolYear":{"type":"string","pattern":"^\\d{4}-\\d{4}$"},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["buildingId","schoolYear"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews/{id}":{"get":{"summary":"Get a year-end facility review","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a draft review (emits FacilityReviewUpdated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"schoolYear":{"type":"string","pattern":"^\\d{4}-\\d{4}$"},"facilityType":{"type":"string","maxLength":100,"nullable":true},"address":{"type":"string","maxLength":300,"nullable":true},"yearBuilt":{"type":"integer","minimum":1700,"maximum":2200,"nullable":true},"squareFeet":{"type":"integer","minimum":0,"maximum":100000000,"nullable":true},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","maxLength":200,"nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false},"maxItems":100},"notes":{"type":"string","maxLength":10000,"nullable":true},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","maxLength":5000,"nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","maxLength":5000,"nullable":true},"value":{"type":"string","maxLength":5000,"nullable":true}},"required":["id"],"additionalProperties":false},"maxItems":400}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a draft review (emits FacilityReviewDeleted)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews/{id}/sync-questions":{"post":{"summary":"Bring a draft review in line with the current checklist (emits FacilityReviewUpdated)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews/{id}/publish":{"post":{"summary":"Publish a review for public viewing (emits FacilityReviewPublished)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews/{id}/unpublish":{"post":{"summary":"Take a review down from public view (emits FacilityReviewUnpublished)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","status","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","updatedAt","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facility-reviews/{id}/pdf":{"get":{"summary":"Download a review as a PDF","tags":["Facilities"],"description":"Binary response, content-type application/pdf.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/facilities/reports/work-order-throughput":{"get":{"summary":"Work-order volume, SLA compliance, and time to resolve","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"opened":{"type":"integer"},"closed":{"type":"integer"},"stillOpen":{"type":"integer"},"slaMetCount":{"type":"integer"},"slaMissedCount":{"type":"integer"},"slaCompliancePct":{"type":"number","nullable":true},"medianDaysToResolve":{"type":"number","nullable":true},"byPriority":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string"},"opened":{"type":"integer"},"closed":{"type":"integer"},"slaMetCount":{"type":"integer"},"slaMissedCount":{"type":"integer"}},"required":["priority","opened","closed","slaMetCount","slaMissedCount"],"additionalProperties":false}},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"opened":{"type":"integer"},"closed":{"type":"integer"}},"required":["category","opened","closed"],"additionalProperties":false}},"byBuilding":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid","nullable":true},"buildingName":{"type":"string"},"opened":{"type":"integer"},"closed":{"type":"integer"},"stillOpen":{"type":"integer"}},"required":["buildingId","buildingName","opened","closed","stillOpen"],"additionalProperties":false}}},"required":["opened","closed","stillOpen","slaMetCount","slaMissedCount","slaCompliancePct","medianDaysToResolve","byPriority","byCategory","byBuilding"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/reports/pm-compliance":{"get":{"summary":"Preventive-maintenance schedule adherence","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheduleCount":{"type":"integer"},"activeScheduleCount":{"type":"integer"},"overdueScheduleCount":{"type":"integer"},"generatedWorkOrders":{"type":"integer"},"completedWorkOrders":{"type":"integer"},"completionPct":{"type":"number","nullable":true},"schedules":{"type":"array","items":{"type":"object","properties":{"scheduleId":{"type":"string","format":"uuid"},"title":{"type":"string"},"category":{"type":"string"},"frequency":{"type":"string"},"nextDueAt":{"type":"string","format":"date-time"},"isActive":{"type":"boolean"},"daysOverdue":{"type":"integer","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true}},"required":["scheduleId","title","category","frequency","nextDueAt","isActive","daysOverdue","lastGeneratedAt"],"additionalProperties":false}}},"required":["scheduleCount","activeScheduleCount","overdueScheduleCount","generatedWorkOrders","completedWorkOrders","completionPct","schedules"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/reports/inspection-status":{"get":{"summary":"Inspection pass rates, overdue inspections, expiring certificates","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":730,"default":90},"in":"query","name":"expiryHorizonDays","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheduled":{"type":"integer"},"inProgress":{"type":"integer"},"overdue":{"type":"integer"},"passed":{"type":"integer"},"passedWithDeficiencies":{"type":"integer"},"failed":{"type":"integer"},"passRatePct":{"type":"number","nullable":true},"deficienciesRaised":{"type":"integer"},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"completed":{"type":"integer"},"failed":{"type":"integer"},"overdue":{"type":"integer"}},"required":["category","completed","failed","overdue"],"additionalProperties":false}},"overdueInspections":{"type":"array","items":{"type":"object","properties":{"inspectionId":{"type":"string","format":"uuid"},"referenceNumber":{"type":"string"},"templateName":{"type":"string"},"buildingName":{"type":"string","nullable":true},"dueAt":{"type":"string","format":"date-time"},"daysOverdue":{"type":"integer"}},"required":["inspectionId","referenceNumber","templateName","buildingName","dueAt","daysOverdue"],"additionalProperties":false}},"expiringCertificates":{"type":"array","items":{"type":"object","properties":{"certificateId":{"type":"string","format":"uuid"},"name":{"type":"string"},"buildingName":{"type":"string","nullable":true},"certificateNumber":{"type":"string","nullable":true},"expiresOn":{"type":"string","format":"date-time"},"daysUntilExpiry":{"type":"integer"}},"required":["certificateId","name","buildingName","certificateNumber","expiresOn","daysUntilExpiry"],"additionalProperties":false}}},"required":["scheduled","inProgress","overdue","passed","passedWithDeficiencies","failed","passRatePct","deficienciesRaised","byCategory","overdueInspections","expiringCertificates"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/reports/deferred-maintenance":{"get":{"summary":"Facility Condition Index and the unfunded deficiency backlog","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtFci":{"type":"number","nullable":true},"districtRating":{"type":"string","nullable":true},"totalReplacementValue":{"type":"string"},"totalDeficiencyCost":{"type":"string"},"buildings":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"squareFeet":{"type":"integer","nullable":true},"assessedOn":{"type":"string","format":"date-time","nullable":true},"replacementValue":{"type":"string","nullable":true},"deficiencyCost":{"type":"string","nullable":true},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","nullable":true},"remainingUsefulLifeYears":{"type":"integer","nullable":true},"openCapitalProjects":{"type":"integer"},"plannedCapitalSpend":{"type":"string"},"unfundedDeficiency":{"type":"string","nullable":true}},"required":["buildingId","buildingName","squareFeet","assessedOn","replacementValue","deficiencyCost","facilityConditionIndex","conditionRating","remainingUsefulLifeYears","openCapitalProjects","plannedCapitalSpend","unfundedDeficiency"],"additionalProperties":false}},"unassessedBuildings":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"}},"required":["buildingId","buildingName"],"additionalProperties":false}}},"required":["districtFci","districtRating","totalReplacementValue","totalDeficiencyCost","buildings","unassessedBuildings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/maintenance-schedules":{"get":{"summary":"List preventive-maintenance schedules (due-soonest first)","tags":["Facilities"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"in":"query","name":"category","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"daysUntilDue":{"type":"integer"},"leadTimeDays":{"type":"integer"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true},"lastWorkOrderId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","buildingId","roomId","assetId","title","description","category","priority","frequency","intervalDays","nextDueAt","daysUntilDue","leadTimeDays","assignedToPersonId","lastGeneratedAt","lastWorkOrderId","isActive","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a schedule (emits MaintenanceScheduleCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"],"default":"other"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"default":"normal"},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","minimum":1,"maximum":3660},"nextDueAt":{"type":"string","format":"date-time"},"leadTimeDays":{"type":"integer","minimum":0,"maximum":365,"default":7},"schoolId":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"assetId":{"type":"string","format":"uuid"},"assignedToPersonId":{"type":"string","format":"uuid"}},"required":["title","frequency","nextDueAt","schoolId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"daysUntilDue":{"type":"integer"},"leadTimeDays":{"type":"integer"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true},"lastWorkOrderId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","buildingId","roomId","assetId","title","description","category","priority","frequency","intervalDays","nextDueAt","daysUntilDue","leadTimeDays","assignedToPersonId","lastGeneratedAt","lastWorkOrderId","isActive","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/maintenance-schedules/{id}":{"patch":{"summary":"Edit a schedule (emits MaintenanceScheduleUpdated when fields change)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","minimum":1,"maximum":3660,"nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"leadTimeDays":{"type":"integer","minimum":0,"maximum":365},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"daysUntilDue":{"type":"integer"},"leadTimeDays":{"type":"integer"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true},"lastWorkOrderId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","buildingId","roomId","assetId","title","description","category","priority","frequency","intervalDays","nextDueAt","daysUntilDue","leadTimeDays","assignedToPersonId","lastGeneratedAt","lastWorkOrderId","isActive","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/maintenance-schedules/{id}/deactivate":{"post":{"summary":"Deactivate a schedule (emits MaintenanceScheduleDeactivated)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"daysUntilDue":{"type":"integer"},"leadTimeDays":{"type":"integer"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true},"lastWorkOrderId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","buildingId","roomId","assetId","title","description","category","priority","frequency","intervalDays","nextDueAt","daysUntilDue","leadTimeDays","assignedToPersonId","lastGeneratedAt","lastWorkOrderId","isActive","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/maintenance-schedules/{id}/activate":{"post":{"summary":"Re-activate a schedule (emits MaintenanceScheduleUpdated)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"roomId":{"type":"string","format":"uuid","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","enum":["hvac","plumbing","electrical","custodial","grounds","tech","furniture","safety","other"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","semiannual","annual","custom"]},"intervalDays":{"type":"integer","nullable":true},"nextDueAt":{"type":"string","format":"date-time"},"daysUntilDue":{"type":"integer"},"leadTimeDays":{"type":"integer"},"assignedToPersonId":{"type":"string","format":"uuid","nullable":true},"lastGeneratedAt":{"type":"string","format":"date-time","nullable":true},"lastWorkOrderId":{"type":"string","format":"uuid","nullable":true},"isActive":{"type":"boolean"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","buildingId","roomId","assetId","title","description","category","priority","frequency","intervalDays","nextDueAt","daysUntilDue","leadTimeDays","assignedToPersonId","lastGeneratedAt","lastWorkOrderId","isActive","createdByUserId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/maintenance-schedules/{id}/generate-now":{"post":{"summary":"Materialize a work order from this schedule immediately (emits MaintenanceWorkOrderGenerated)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workOrderId":{"type":"string","format":"uuid"},"ticketNumber":{"type":"string"},"scheduleId":{"type":"string","format":"uuid"},"nextDueAt":{"type":"string","format":"date-time"}},"required":["workOrderId","ticketNumber","scheduleId","nextDueAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/room-reservations":{"get":{"summary":"List room reservations (filter by status, room, school, date range)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","enum":["pending","approved","declined","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"roomId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Request a room reservation (emits ReservationRequested; 409 when an approved reservation overlaps, pending overlaps returned as warnings)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"purpose":{"type":"string","maxLength":5000},"roomId":{"type":"string","format":"uuid"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"organization":{"type":"string","maxLength":200},"contactEmail":{"type":"string","format":"email","maxLength":320},"feeCents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["title","roomId","startsAt","endsAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"reservationId":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"required":["reservationId","title","status","startsAt","endsAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","warnings","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/room-reservations/mine":{"get":{"summary":"List the caller's own reservation requests","tags":["Facilities"],"parameters":[{"schema":{"type":"string","enum":["pending","approved","declined","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"roomId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/room-reservations/{id}/approve":{"post":{"summary":"Approve a pending reservation (re-checks approved overlaps; emits ReservationApproved)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decisionNotes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/room-reservations/{id}/decline":{"post":{"summary":"Decline a pending reservation with notes (emits ReservationDeclined)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decisionNotes":{"type":"string","minLength":1,"maxLength":500}},"required":["decisionNotes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/room-reservations/{id}/cancel":{"post":{"summary":"Cancel a reservation — requester or facilities manager (emits ReservationCancelled)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decisionNotes":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"title":{"type":"string"},"purpose":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","format":"uuid"},"requestedByName":{"type":"string","nullable":true},"organization":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","approved","declined","cancelled"]},"decidedByUserId":{"type":"string","format":"uuid","nullable":true},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decisionNotes":{"type":"string","nullable":true},"feeCents":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","roomId","roomNumber","schoolName","title","purpose","requestedByUserId","requestedByName","organization","contactEmail","startsAt","endsAt","status","decidedByUserId","decidedAt","decisionNotes","feeCents","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-context":{"get":{"summary":"Schools the caller may open, and where to send them by default","tags":["Schools"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtWide":{"type":"boolean"},"defaultOrganizationId":{"type":"string","format":"uuid","nullable":true},"schools":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true}},"required":["schoolId","organizationId","name","code","principal","phone","website"],"additionalProperties":false}}},"required":["districtWide","defaultOrganizationId","schools"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-context/{organizationId}":{"get":{"summary":"One school by organization id, refused unless in the caller’s scope","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true}},"required":["schoolId","organizationId","name","code","principal","phone","website"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-page/{organizationId}/profile":{"get":{"summary":"Header strip and branding for a school","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"principalName":{"type":"string","nullable":true},"principalPhoto":{"type":"string","nullable":true},"assistantPrincipalName":{"type":"string","nullable":true},"assistantPrincipalPhoto":{"type":"string","nullable":true},"schoolHours":{"type":"string","nullable":true},"mainOfficePhone":{"type":"string","nullable":true},"emergencyContactsUrl":{"type":"string","nullable":true},"website":{"type":"string","nullable":true}},"required":["schoolId","organizationId","name","logoUrl","principalName","principalPhoto","assistantPrincipalName","assistantPrincipalPhoto","schoolHours","mainOfficePhone","emergencyContactsUrl","website"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a school’s header strip and branding","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"logoUrl":{"type":"string","maxLength":2000000,"nullable":true},"principalName":{"type":"string","maxLength":200,"nullable":true},"principalPhoto":{"type":"string","maxLength":2000000,"nullable":true},"assistantPrincipalName":{"type":"string","maxLength":200,"nullable":true},"assistantPrincipalPhoto":{"type":"string","maxLength":2000000,"nullable":true},"schoolHours":{"type":"string","maxLength":100,"nullable":true},"mainOfficePhone":{"type":"string","maxLength":30,"nullable":true},"emergencyContactsUrl":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"principalName":{"type":"string","nullable":true},"principalPhoto":{"type":"string","nullable":true},"assistantPrincipalName":{"type":"string","nullable":true},"assistantPrincipalPhoto":{"type":"string","nullable":true},"schoolHours":{"type":"string","nullable":true},"mainOfficePhone":{"type":"string","nullable":true},"emergencyContactsUrl":{"type":"string","nullable":true},"website":{"type":"string","nullable":true}},"required":["schoolId","organizationId","name","logoUrl","principalName","principalPhoto","assistantPrincipalName","assistantPrincipalPhoto","schoolHours","mainOfficePhone","emergencyContactsUrl","website"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-page/{organizationId}/glance":{"get":{"summary":"Today at a Glance for one school — every figure school-scoped","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attendance":{"type":"object","properties":{"presentPct":{"type":"number","nullable":true},"presentCount":{"type":"integer"},"totalCount":{"type":"integer"},"chronicAbsentees":{"type":"integer","nullable":true},"deltaVsYesterdayPct":{"type":"number","nullable":true},"asOf":{"type":"string","nullable":true},"isFallback":{"type":"boolean"}},"required":["presentPct","presentCount","totalCount","chronicAbsentees","deltaVsYesterdayPct","asOf","isFallback"],"additionalProperties":false},"staff":{"type":"object","properties":{"absentToday":{"type":"integer"},"subCoverage":{"type":"integer"},"vacantPositions":{"type":"integer","nullable":true}},"required":["absentToday","subCoverage","vacantPositions"],"additionalProperties":false},"discipline":{"type":"object","properties":{"incidentsToday":{"type":"integer"},"pendingInvestigations":{"type":"integer"},"suspensions":{"type":"integer"}},"required":["incidentsToday","pendingInvestigations","suspensions"],"additionalProperties":false},"visitors":{"type":"object","properties":{"today":{"type":"integer"},"deliveries":{"type":"integer","nullable":true},"facilityRentals":{"type":"integer","nullable":true}},"required":["today","deliveries","facilityRentals"],"additionalProperties":false},"building":{"type":"object","properties":{"openWorkOrders":{"type":"integer"},"urgentWorkOrders":{"type":"integer"},"overdueInspections":{"type":"integer","nullable":true}},"required":["openWorkOrders","urgentWorkOrders","overdueInspections"],"additionalProperties":false},"enrollment":{"type":"integer"}},"required":["attendance","staff","discipline","visitors","building","enrollment"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-page/{organizationId}/links":{"get":{"summary":"Quick Launch tiles and Principal Resources for a school","tags":["Schools"],"parameters":[{"schema":{"type":"string","enum":["quick_launch","resources"]},"in":"query","name":"placement","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"placement":{"type":"string","enum":["quick_launch","resources"]},"label":{"type":"string"},"url":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"newTab":{"type":"boolean"},"sortOrder":{"type":"integer"},"schoolSpecific":{"type":"boolean"}},"required":["id","placement","label","url","logoUrl","icon","newTab","sortOrder","schoolSpecific"],"additionalProperties":false}},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a link tile (district-wide, or specific to this school)","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"placement":{"type":"string","enum":["quick_launch","resources"],"default":"quick_launch"},"label":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","minLength":1,"maxLength":1000},"logoUrl":{"type":"string","maxLength":2000000},"icon":{"type":"string","maxLength":40},"newTab":{"type":"boolean","default":true},"sortOrder":{"type":"integer","minimum":0,"maximum":999,"default":0},"schoolSpecific":{"type":"boolean","default":false}},"required":["label","url"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"placement":{"type":"string","enum":["quick_launch","resources"]},"label":{"type":"string"},"url":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"newTab":{"type":"boolean"},"sortOrder":{"type":"integer"},"schoolSpecific":{"type":"boolean"}},"required":["id","placement","label","url","logoUrl","icon","newTab","sortOrder","schoolSpecific"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-page/{organizationId}/links/{linkId}":{"patch":{"summary":"Edit a link tile","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","minLength":1,"maxLength":1000},"logoUrl":{"type":"string","maxLength":2000000,"nullable":true},"icon":{"type":"string","maxLength":40,"nullable":true},"newTab":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":999},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"linkId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"placement":{"type":"string","enum":["quick_launch","resources"]},"label":{"type":"string"},"url":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"newTab":{"type":"boolean"},"sortOrder":{"type":"integer"},"schoolSpecific":{"type":"boolean"}},"required":["id","placement","label","url","logoUrl","icon","newTab","sortOrder","schoolSpecific"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/daily-operations":{"get":{"summary":"Daily Operations","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"calendarDay":{"type":"object","properties":{"dayType":{"type":"string"},"reason":{"type":"string","nullable":true},"overridden":{"type":"boolean"}},"required":["dayType","reason","overridden"],"additionalProperties":false,"nullable":true},"staffAbsences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"staffName":{"type":"string"},"reasonCode":{"type":"string"},"halfDay":{"type":"boolean"},"mustFill":{"type":"boolean"},"status":{"type":"string"},"subStatus":{"type":"string","nullable":true}},"required":["id","staffName","reasonCode","halfDay","mustFill","status","subStatus"],"additionalProperties":false}},"visitorsInBuilding":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"visitorName":{"type":"string"},"purpose":{"type":"string"},"checkInAt":{"type":"string"},"badgeNumber":{"type":"string","nullable":true}},"required":["id","visitorName","purpose","checkInAt","badgeNumber"],"additionalProperties":false}},"mealService":{"type":"array","items":{"type":"object","properties":{"mealType":{"type":"string"},"totalReimbursable":{"type":"integer"},"freeCount":{"type":"integer"},"reducedCount":{"type":"integer"},"paidCount":{"type":"integer"},"status":{"type":"string"}},"required":["mealType","totalReimbursable","freeCount","reducedCount","paidCount","status"],"additionalProperties":false}}},"required":["calendarDay","staffAbsences","visitorsInBuilding","mealService"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/staff":{"get":{"summary":"Staff roster with today’s absences","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"absentToday":{"type":"integer"},"byJobCode":{"type":"array","items":{"type":"object","properties":{"jobCode":{"type":"string"},"count":{"type":"integer"}},"required":["jobCode","count"],"additionalProperties":false}},"staff":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"jobCode":{"type":"string"},"jobCodeSubcategory":{"type":"string","nullable":true},"fte":{"type":"number"},"absentToday":{"type":"boolean"}},"required":["personId","name","jobCode","jobCodeSubcategory","fte","absentToday"],"additionalProperties":false}}},"required":["total","absentToday","byJobCode","staff"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/academics":{"get":{"summary":"Sections, courses, class sizes","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sectionCount":{"type":"integer"},"courseCount":{"type":"integer"},"avgClassSize":{"type":"number","nullable":true},"byDepartment":{"type":"array","items":{"type":"object","properties":{"department":{"type":"string"},"count":{"type":"integer"}},"required":["department","count"],"additionalProperties":false}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"courseName":{"type":"string"},"subjectArea":{"type":"string"},"isAP":{"type":"boolean"},"isHonors":{"type":"boolean"},"termName":{"type":"string"},"teacherName":{"type":"string","nullable":true},"enrollmentCount":{"type":"integer"},"capacity":{"type":"integer","nullable":true}},"required":["id","name","courseName","subjectArea","isAP","isHonors","termName","teacherName","enrollmentCount","capacity"],"additionalProperties":false}}},"required":["sectionCount","courseCount","avgClassSize","byDepartment","sections"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/safety":{"get":{"summary":"Drills, visitors, incidents","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"currentSchoolYearId":{"type":"string","format":"uuid","nullable":true},"drillsThisYear":{"type":"array","items":{"type":"object","properties":{"drillType":{"type":"string"},"count":{"type":"integer"}},"required":["drillType","count"],"additionalProperties":false}},"recentDrills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"drillType":{"type":"string"},"drillDate":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true}},"required":["id","drillType","drillDate","durationSeconds","wasAnnounced","participantCount"],"additionalProperties":false}},"visitorsToday":{"type":"integer"},"visitorsLast7Days":{"type":"integer"},"incidentsLast30Days":{"type":"integer"},"incidentsByStatus":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"count":{"type":"integer"}},"required":["status","count"],"additionalProperties":false}},"recentIncidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"incidentDate":{"type":"string"},"offenseCode":{"type":"string"},"status":{"type":"string"},"location":{"type":"string","nullable":true},"policeInvolved":{"type":"boolean"}},"required":["id","incidentDate","offenseCode","status","location","policeInvolved"],"additionalProperties":false}}},"required":["schoolId","currentSchoolYearId","drillsThisYear","recentDrills","visitorsToday","visitorsLast7Days","incidentsLast30Days","incidentsByStatus","recentIncidents"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/facilities":{"get":{"summary":"Work orders, maintenance, reservations","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"byStatus":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"count":{"type":"integer"}},"required":["status","count"],"additionalProperties":false}},"byPriority":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string"},"count":{"type":"integer"}},"required":["priority","count"],"additionalProperties":false}},"openWorkOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"},"slaDueAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","ticketNumber","title","description","category","priority","status","slaDueAt","createdAt"],"additionalProperties":false}},"maintenanceDue":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"priority":{"type":"string"},"nextDueAt":{"type":"string"}},"required":["id","title","category","priority","nextDueAt"],"additionalProperties":false}},"upcomingReservations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"organization":{"type":"string","nullable":true},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string"}},"required":["id","title","organization","startsAt","endsAt","status"],"additionalProperties":false}},"roomCount":{"type":"integer"},"buildingCount":{"type":"integer"}},"required":["byStatus","byPriority","openWorkOrders","maintenanceDue","upcomingReservations","roomCount","buildingCount"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/technology":{"get":{"summary":"Tech work orders and asset inventory","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"openTechWorkOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketNumber":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","ticketNumber","title","priority","status","createdAt"],"additionalProperties":false}},"assetsByCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"count":{"type":"integer"}},"required":["category","count"],"additionalProperties":false}},"assetsByCondition":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string"},"count":{"type":"integer"}},"required":["condition","count"],"additionalProperties":false}},"assetTotal":{"type":"integer"}},"required":["openTechWorkOrders","assetsByCategory","assetsByCondition","assetTotal"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/communications":{"get":{"summary":"Announcements reaching this school","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"announcements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"pinned":{"type":"boolean"},"requireAck":{"type":"boolean"},"schoolSpecific":{"type":"boolean"},"publishAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","body","category","pinned","requireAck","schoolSpecific","publishAt","createdAt"],"additionalProperties":false}}},"required":["announcements"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/calendar":{"get":{"summary":"District calendar with school overrides","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"dayType":{"type":"string"},"countsAsInstructional":{"type":"boolean"},"reason":{"type":"string","nullable":true},"overridden":{"type":"boolean"}},"required":["date","dayType","countsAsInstructional","reason","overridden"],"additionalProperties":false}}},"required":["days"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/documents":{"get":{"summary":"Recent documents (district-wide)","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolScoped":{"type":"boolean","enum":[false]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"category":{"type":"string"},"sizeBytes":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","filename","category","sizeBytes","createdAt"],"additionalProperties":false}}},"required":["schoolScoped","documents"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/forms":{"get":{"summary":"Surveys and forms (district-wide)","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolScoped":{"type":"boolean","enum":[false]},"surveys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"audience":{"type":"string"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"questionCount":{"type":"integer"},"responseCount":{"type":"integer"}},"required":["id","title","status","audience","opensAt","closesAt","questionCount","responseCount"],"additionalProperties":false}}},"required":["schoolScoped","surveys"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/reports":{"get":{"summary":"School trend data for charts","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attendanceTrend":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"presentPct":{"type":"number"}},"required":["date","presentPct"],"additionalProperties":false}},"enrollmentByGrade":{"type":"array","items":{"type":"object","properties":{"gradeLevel":{"type":"string"},"count":{"type":"integer"}},"required":["gradeLevel","count"],"additionalProperties":false}},"visitorsByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}},"required":["date","count"],"additionalProperties":false}},"workOrdersByStatus":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"count":{"type":"integer"}},"required":["status","count"],"additionalProperties":false}},"incidentsByMonth":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"count":{"type":"integer"}},"required":["month","count"],"additionalProperties":false}},"busRoutes":{"type":"integer"},"ridersByRoute":{"type":"array","items":{"type":"object","properties":{"route":{"type":"string"},"riders":{"type":"integer"}},"required":["route","riders"],"additionalProperties":false}},"academics":{"type":"object","properties":{"studentsWithGpa":{"type":"integer"},"onTrackPct":{"type":"number","nullable":true},"gpaBuckets":{"type":"array","items":{"type":"integer"}},"honorRoll":{"type":"integer"}},"required":["studentsWithGpa","onTrackPct","gpaBuckets","honorRoll"],"additionalProperties":false}},"required":["attendanceTrend","enrollmentByGrade","visitorsByDay","workOrdersByStatus","incidentsByMonth","busRoutes","ridersByRoute","academics"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/weather":{"get":{"summary":"Current weather for the district’s town","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tempF":{"type":"number","nullable":true},"condition":{"type":"string","nullable":true},"asOf":{"type":"string","nullable":true}},"required":["tempF","condition","asOf"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/students":{"get":{"summary":"Student roster with search and grade filter","tags":["Schools"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":5},"in":"query","name":"grade","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"byGrade":{"type":"array","items":{"type":"object","properties":{"gradeLevel":{"type":"string"},"count":{"type":"integer"}},"required":["gradeLevel","count"],"additionalProperties":false}},"students":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"enrolledSince":{"type":"string"}},"required":["personId","name","localId","gradeLevel","enrolledSince"],"additionalProperties":false}}},"required":["total","byGrade","students"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/students/{personId}":{"get":{"summary":"One student’s attendance, classes, incidents, guardians","tags":["Schools"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"enrolledSince":{"type":"string"},"dateOfBirth":{"type":"string","nullable":true},"attendance":{"type":"object","properties":{"daysTaken":{"type":"integer"},"present":{"type":"integer"},"absent":{"type":"integer"},"tardy":{"type":"integer"},"presentPct":{"type":"number","nullable":true},"chronicallyAbsent":{"type":"boolean"},"recent":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"status":{"type":"string"}},"required":["date","status"],"additionalProperties":false}}},"required":["daysTaken","present","absent","tardy","presentPct","chronicallyAbsent","recent"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"courseName":{"type":"string"},"teacherName":{"type":"string","nullable":true}},"required":["id","name","courseName","teacherName"],"additionalProperties":false}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"offenseCode":{"type":"string"},"status":{"type":"string"},"role":{"type":"string"}},"required":["id","date","offenseCode","status","role"],"additionalProperties":false}},"guardians":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"relationship":{"type":"string"}},"required":["name","relationship"],"additionalProperties":false}}},"required":["personId","name","localId","gradeLevel","enrolledSince","dateOfBirth","attendance","sections","incidents","guardians"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/ask":{"post":{"summary":"Ask Omni Forge AI about this school","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":500}},"required":["question"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/report-pdf":{"post":{"summary":"Produce the building report for this school as a PDF","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000}},"additionalProperties":false,"default":{}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"sizeBytes":{"type":"number"},"downloadUrl":{"type":"string"}},"required":["id","filename","sizeBytes","downloadUrl"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/school-sections/{organizationId}/email-report":{"post":{"summary":"Email the building report for this school (PDF attached)","tags":["Schools"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","format":"email"},"note":{"type":"string","maxLength":1000}},"required":["to"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sent":{"type":"boolean"},"to":{"type":"string"},"emailId":{"type":"string"}},"required":["sent","to","emailId"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/commission/dashboard":{"get":{"summary":"Commission Dashboard: events, updates, HIB, attendance, alerts, committee reports, communications, calendars, athletics","tags":["Board"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/committee-reports/{id}":{"get":{"summary":"One committee report (drafts only for editors)","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit a committee report","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"committee":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":200},"meetingDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"chairName":{"type":"string","maxLength":200,"nullable":true},"summary":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","published"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete a committee report","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/committee-reports":{"post":{"summary":"File a committee report (draft or published)","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"committee":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":200},"meetingDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"chairName":{"type":"string","maxLength":200,"nullable":true},"summary":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","published"]}},"required":["committee","title","meetingDate","summary","body","status"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/events/{id}":{"get":{"summary":"One district event, for editing","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit a district event","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["board","academic","arts","community","athletics","holiday","ceremony"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true},"location":{"type":"string","maxLength":300,"nullable":true},"description":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"isPublic":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete a district event","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/events":{"post":{"summary":"Add a district event","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["board","academic","arts","community","athletics","holiday","ceremony"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true},"location":{"type":"string","maxLength":300,"nullable":true},"description":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true},"isPublic":{"type":"boolean"}},"required":["title","category","startsAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/updates/{id}":{"get":{"summary":"One update, for editing","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit an update","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1},"category":{"type":"string","enum":["superintendent","academics","operations","finance","facilities","safety","personnel"]},"authorName":{"type":"string","maxLength":200,"nullable":true},"postedAt":{"type":"string","format":"date-time"},"pinned":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete an update","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/updates":{"post":{"summary":"Post an update to the board","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1},"category":{"type":"string","enum":["superintendent","academics","operations","finance","facilities","safety","personnel"]},"authorName":{"type":"string","maxLength":200,"nullable":true},"postedAt":{"type":"string","format":"date-time"},"pinned":{"type":"boolean"}},"required":["title","body","category"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/games/{id}":{"get":{"summary":"One athletic game, for editing","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit an athletic game, including the final score and status","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sport":{"type":"string","minLength":1,"maxLength":60},"level":{"type":"string","enum":["varsity","jv","freshman","middle_school"]},"opponent":{"type":"string","minLength":1,"maxLength":200},"homeAway":{"type":"string","enum":["home","away","neutral"]},"location":{"type":"string","maxLength":300,"nullable":true},"startsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","final","postponed","cancelled"]},"teamScore":{"type":"integer","minimum":0,"maximum":999,"nullable":true},"opponentScore":{"type":"integer","minimum":0,"maximum":999,"nullable":true},"ticketInfo":{"type":"string","maxLength":300,"nullable":true},"notes":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete an athletic game","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/commission/games":{"post":{"summary":"Add an athletic game","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sport":{"type":"string","minLength":1,"maxLength":60},"level":{"type":"string","enum":["varsity","jv","freshman","middle_school"]},"opponent":{"type":"string","minLength":1,"maxLength":200},"homeAway":{"type":"string","enum":["home","away","neutral"]},"location":{"type":"string","maxLength":300,"nullable":true},"startsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","final","postponed","cancelled"]},"teamScore":{"type":"integer","minimum":0,"maximum":999,"nullable":true},"opponentScore":{"type":"integer","minimum":0,"maximum":999,"nullable":true},"ticketInfo":{"type":"string","maxLength":300,"nullable":true},"notes":{"type":"string","nullable":true},"schoolId":{"type":"string","format":"uuid","nullable":true}},"required":["sport","level","opponent","homeAway","startsAt","status"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/glance":{"get":{"summary":"District glance for the Superintendent Command Center","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/schools":{"get":{"summary":"School comparison grid","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/academics":{"get":{"summary":"Superintendent Command Center: academics","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/students":{"get":{"summary":"Superintendent Command Center: students","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/people":{"get":{"summary":"Superintendent Command Center: people","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/operations":{"get":{"summary":"Superintendent Command Center: operations","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/finance":{"get":{"summary":"Superintendent Command Center: finance","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/board":{"get":{"summary":"Superintendent Command Center: board","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/weather":{"get":{"summary":"Current weather in the district","tags":["Superintendent"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/superintendent/ask":{"post":{"summary":"Ask Omni Forge AI about the district (aggregate figures only)","tags":["Superintendent"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":500},"tab":{"type":"string","enum":["overview","schools","academics","students","people","operations","finance","board"]}},"required":["question"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/rooms":{"get":{"summary":"List rooms (filter by school, type, bookability)","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"buildingId","required":false},{"schema":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"in":"query","name":"roomType","required":false},{"schema":{"type":"boolean"},"in":"query","name":"needsCheck","required":false},{"schema":{"type":"boolean"},"in":"query","name":"bookableOnly","required":false},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeRetired","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"building":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"openWorkOrderCount":{"type":"integer","minimum":0},"assetCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","number","name","roomType","floor","buildingId","building","capacity","isBookable","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a room (emits RoomCreated)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","maxLength":100},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"],"default":"classroom"},"floor":{"type":"string","maxLength":30},"buildingId":{"type":"string","format":"uuid"},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":5000},"isBookable":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":2000}},"required":["schoolId","number"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"building":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"openWorkOrderCount":{"type":"integer","minimum":0},"assetCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","number","name","roomType","floor","buildingId","building","capacity","isBookable","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/rooms/{id}":{"get":{"summary":"Get a room","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"building":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"openWorkOrderCount":{"type":"integer","minimum":0},"assetCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","number","name","roomType","floor","buildingId","building","capacity","isBookable","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a room (emits RoomUpdated when fields change)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":30},"name":{"type":"string","maxLength":100,"nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","maxLength":30,"nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"capacity":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":5000,"nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"building":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"openWorkOrderCount":{"type":"integer","minimum":0},"assetCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","number","name","roomType","floor","buildingId","building","capacity","isBookable","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/rooms/{id}/retire":{"post":{"summary":"Retire a room (soft-delete, emits RoomRetired)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string","nullable":true},"roomType":{"type":"string","enum":["classroom","lab","gym","library","cafeteria","office","nurse","auditorium","storage","restroom","other"]},"floor":{"type":"string","nullable":true},"buildingId":{"type":"string","format":"uuid","nullable":true},"building":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"nullable":true},"capacity":{"type":"integer","nullable":true},"isBookable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"openWorkOrderCount":{"type":"integer","minimum":0},"assetCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","number","name","roomType","floor","buildingId","building","capacity","isBookable","notes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety-drills":{"get":{"summary":"List safety drills","tags":["Safety"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false},{"schema":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"in":"query","name":"drillType","required":false},{"schema":{"type":"boolean"},"in":"query","name":"publicVisibleOnly","required":false},{"schema":{"type":"boolean"},"in":"query","name":"unreportedOnly","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"conductedByName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"publicVisible":{"type":"boolean"},"externallyReportedAt":{"type":"string","format":"date-time","nullable":true},"externalReportRef":{"type":"string","nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","schoolYearId","drillType","drillDate","startTime","durationSeconds","wasAnnounced","participantCount","conductedByPersonId","conductedByName","notes","publicVisible","externallyReportedAt","externalReportRef","stateReportCategory","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Log a new safety drill (emits SafetyDrillLogged)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"durationSeconds":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":14400},"wasAnnounced":{"type":"boolean","default":true},"participantCount":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":20000},"conductedByPersonId":{"type":"string","format":"uuid"},"notes":{"type":"string","maxLength":2000},"publicVisible":{"type":"boolean","default":false},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]}},"required":["schoolId","schoolYearId","drillType","drillDate","startTime"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"conductedByName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"publicVisible":{"type":"boolean"},"externallyReportedAt":{"type":"string","format":"date-time","nullable":true},"externalReportRef":{"type":"string","nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","schoolYearId","drillType","drillDate","startTime","durationSeconds","wasAnnounced","participantCount","conductedByPersonId","conductedByName","notes","publicVisible","externallyReportedAt","externalReportRef","stateReportCategory","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety-drills/annual-report":{"get":{"summary":"Annual state-report roll-up (NJ category counts per school)","tags":["Safety"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"rows":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolName":{"type":"string"},"totals":{"type":"object","properties":{"fire":{"type":"integer","minimum":0},"non_fire_security":{"type":"integer","minimum":0},"bus_evacuation":{"type":"integer","minimum":0},"other":{"type":"integer","minimum":0},"announced":{"type":"integer","minimum":0},"unannounced":{"type":"integer","minimum":0},"pendingReport":{"type":"integer","minimum":0}},"required":["fire","non_fire_security","bus_evacuation","other","announced","unannounced","pendingReport"],"additionalProperties":false}},"required":["schoolId","schoolName","totals"],"additionalProperties":false}}},"required":["schoolYearId","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety-drills/{id}":{"get":{"summary":"Get a safety drill","tags":["Safety"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"conductedByName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"publicVisible":{"type":"boolean"},"externallyReportedAt":{"type":"string","format":"date-time","nullable":true},"externalReportRef":{"type":"string","nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","schoolYearId","drillType","drillDate","startTime","durationSeconds","wasAnnounced","participantCount","conductedByPersonId","conductedByName","notes","publicVisible","externallyReportedAt","externalReportRef","stateReportCategory","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Correct a drill entry (emits SafetyDrillCorrected when fields change)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"durationSeconds":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":14400,"nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":20000,"nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"conductedByName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"publicVisible":{"type":"boolean"},"externallyReportedAt":{"type":"string","format":"date-time","nullable":true},"externalReportRef":{"type":"string","nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","schoolYearId","drillType","drillDate","startTime","durationSeconds","wasAnnounced","participantCount","conductedByPersonId","conductedByName","notes","publicVisible","externallyReportedAt","externalReportRef","stateReportCategory","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety-drills/{id}/visibility":{"post":{"summary":"Toggle public (parent-page) visibility (emits SafetyDrillVisibilityChanged)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"publicVisible":{"type":"boolean"}},"required":["publicVisible"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"drillDate":{"type":"string","format":"date"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"},"participantCount":{"type":"integer","nullable":true},"conductedByPersonId":{"type":"string","format":"uuid","nullable":true},"conductedByName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"publicVisible":{"type":"boolean"},"externallyReportedAt":{"type":"string","format":"date-time","nullable":true},"externalReportRef":{"type":"string","nullable":true},"stateReportCategory":{"type":"string","enum":["fire","non_fire_security","bus_evacuation","other"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolId","schoolYearId","drillType","drillDate","startTime","durationSeconds","wasAnnounced","participantCount","conductedByPersonId","conductedByName","notes","publicVisible","externallyReportedAt","externalReportRef","stateReportCategory","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety-drills/report-filed":{"post":{"summary":"Mark all unreported drills for (school, schoolYear) as filed","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"externalReportRef":{"type":"string","maxLength":100}},"required":["schoolId","schoolYearId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"rows":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolName":{"type":"string"},"totals":{"type":"object","properties":{"fire":{"type":"integer","minimum":0},"non_fire_security":{"type":"integer","minimum":0},"bus_evacuation":{"type":"integer","minimum":0},"other":{"type":"integer","minimum":0},"announced":{"type":"integer","minimum":0},"unannounced":{"type":"integer","minimum":0},"pendingReport":{"type":"integer","minimum":0}},"required":["fire","non_fire_security","bus_evacuation","other","announced","unannounced","pendingReport"],"additionalProperties":false}},"required":["schoolId","schoolName","totals"],"additionalProperties":false}}},"required":["schoolYearId","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/schools/{schoolId}/safety/public-drills":{"get":{"summary":"Parent-facing drill list (date, type, duration only)","tags":["Safety"],"description":"No authentication required. Caller supplies districtId via the X-District-Id header (same mechanism the other dev-header routes use). Only drills flagged publicVisible=true are returned.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"schoolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"drills":{"type":"array","items":{"type":"object","properties":{"drillDate":{"type":"string","format":"date"},"drillType":{"type":"string","enum":["fire","lockdown","shelter_in_place","evacuation","bus_evacuation","severe_weather","bomb_threat","other"]},"durationSeconds":{"type":"integer","nullable":true}},"required":["drillDate","drillType","durationSeconds"],"additionalProperties":false}}},"required":["schoolId","schoolYearId","drills"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/presence":{"get":{"summary":"Who is in every building right now","tags":["Safety"],"description":"Students expected against attendance taken, staff expected against absences and sub coverage, and visitors still signed in — for every school the caller may open.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"asOf":{"type":"string"},"district":{"type":"object","properties":{"studentsExpected":{"type":"integer"},"studentsUnaccounted":{"type":"integer"},"studentsAbsent":{"type":"integer"},"staffOnSite":{"type":"integer"},"unfilledAbsences":{"type":"integer"},"visitorsOnSite":{"type":"integer"},"flaggedVisitors":{"type":"integer"}},"required":["studentsExpected","studentsUnaccounted","studentsAbsent","staffOnSite","unfilledAbsences","visitorsOnSite","flaggedVisitors"],"additionalProperties":false,"nullable":true},"schools":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"schoolId":{"type":"string"},"name":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"students":{"type":"object","properties":{"expected":{"type":"integer"},"present":{"type":"integer"},"tardy":{"type":"integer"},"absent":{"type":"integer"},"unaccounted":{"type":"integer"}},"required":["expected","present","tardy","absent","unaccounted"],"additionalProperties":false,"nullable":true},"staff":{"type":"object","properties":{"expected":{"type":"integer"},"absent":{"type":"integer"},"onSite":{"type":"integer"},"unfilledAbsences":{"type":"integer"}},"required":["expected","absent","onSite","unfilledAbsences"],"additionalProperties":false,"nullable":true},"visitors":{"type":"object","properties":{"onSite":{"type":"integer"},"flagged":{"type":"integer"}},"required":["onSite","flagged"],"additionalProperties":false,"nullable":true},"drillToday":{"type":"object","properties":{"id":{"type":"string"},"drillType":{"type":"string"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true}},"required":["id","drillType","startTime","durationSeconds"],"additionalProperties":false,"nullable":true}},"required":["organizationId","schoolId","name","principal","phone","students","staff","visitors","drillToday"],"additionalProperties":false}}},"required":["asOf","district","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/presence/{organizationId}":{"get":{"summary":"One school, name by name","tags":["Safety"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"asOf":{"type":"string"},"school":{"type":"object","properties":{"organizationId":{"type":"string"},"schoolId":{"type":"string"},"name":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["organizationId","schoolId","name","principal","phone"],"additionalProperties":false},"dayType":{"type":"string","nullable":true},"dayReason":{"type":"string","nullable":true},"counts":{"type":"object","properties":{"students":{"type":"object","properties":{"expected":{"type":"integer"},"present":{"type":"integer"},"tardy":{"type":"integer"},"absent":{"type":"integer"},"unaccounted":{"type":"integer"}},"required":["expected","present","tardy","absent","unaccounted"],"additionalProperties":false},"staff":{"type":"object","properties":{"expected":{"type":"integer"},"absent":{"type":"integer"},"onSite":{"type":"integer"},"unfilledAbsences":{"type":"integer"}},"required":["expected","absent","onSite","unfilledAbsences"],"additionalProperties":false},"visitors":{"type":"object","properties":{"onSite":{"type":"integer"},"flagged":{"type":"integer"}},"required":["onSite","flagged"],"additionalProperties":false}},"required":["students","staff","visitors"],"additionalProperties":false},"students":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"state":{"type":"string","enum":["present","tardy","absent","unaccounted"]},"code":{"type":"string","nullable":true}},"required":["personId","name","gradeLevel","state","code"],"additionalProperties":false},"nullable":true},"staff":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"jobCode":{"type":"string"},"state":{"type":"string","enum":["expected","absent"]}},"required":["personId","name","jobCode","state"],"additionalProperties":false},"nullable":true},"coverage":{"type":"array","items":{"type":"object","properties":{"absenceId":{"type":"string"},"name":{"type":"string"},"reasonCode":{"type":"string"},"halfDay":{"type":"boolean"},"mustFill":{"type":"boolean"},"covered":{"type":"boolean"},"gap":{"type":"boolean"}},"required":["absenceId","name","reasonCode","halfDay","mustFill","covered","gap"],"additionalProperties":false},"nullable":true},"visitors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"company":{"type":"string","nullable":true},"purpose":{"type":"string"},"checkInAt":{"type":"string"},"badgeNumber":{"type":"string","nullable":true},"flagged":{"type":"boolean"}},"required":["id","name","company","purpose","checkInAt","badgeNumber","flagged"],"additionalProperties":false},"nullable":true},"drillToday":{"type":"object","properties":{"id":{"type":"string"},"drillType":{"type":"string"},"startTime":{"type":"string"},"durationSeconds":{"type":"integer","nullable":true},"wasAnnounced":{"type":"boolean"}},"required":["id","drillType","startTime","durationSeconds","wasAnnounced"],"additionalProperties":false,"nullable":true},"sources":{"type":"string"}},"required":["asOf","school","dayType","dayReason","counts","students","staff","coverage","visitors","drillToday","sources"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district-calendar":{"get":{"summary":"List all calendar days for a school year (school overrides folded in if schoolId is passed)","tags":["District Calendar"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"totalInstructionalDays":{"type":"integer","minimum":0},"totalInstructionalMinutes":{"type":"integer","minimum":0},"days":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","nullable":true},"reason":{"type":"string","nullable":true},"overrideDayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"],"nullable":true},"overrideReason":{"type":"string","nullable":true},"effectiveDayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"effectiveCountsAsInstructional":{"type":"boolean"},"effectiveInstructionalMinutes":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolYearId","date","dayType","countsAsInstructional","instructionalMinutes","reason","effectiveDayType","effectiveCountsAsInstructional","effectiveInstructionalMinutes","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["schoolYearId","schoolId","totalInstructionalDays","totalInstructionalMinutes","days"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district-calendar/publish":{"post":{"summary":"Bulk-publish or re-publish the district calendar for a school year (emits CalendarPublished)","tags":["District Calendar"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","minimum":0,"maximum":900,"nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true}},"required":["date","dayType"],"additionalProperties":false},"minItems":1,"maxItems":500}},"required":["schoolYearId","days"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"dayCount":{"type":"integer","minimum":0}},"required":["schoolYearId","dayCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district-calendar/days/{date}":{"patch":{"summary":"Create or edit a single district calendar day (emits CalendarDaySet)","tags":["District Calendar"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","minimum":0,"maximum":900,"nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true}},"required":["schoolYearId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"path","name":"date","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolYearId":{"type":"string","format":"uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","nullable":true},"reason":{"type":"string","nullable":true},"overrideDayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"],"nullable":true},"overrideReason":{"type":"string","nullable":true},"effectiveDayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"effectiveCountsAsInstructional":{"type":"boolean"},"effectiveInstructionalMinutes":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","schoolYearId","date","dayType","countsAsInstructional","instructionalMinutes","reason","effectiveDayType","effectiveCountsAsInstructional","effectiveInstructionalMinutes","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Soft-delete a district calendar day (emits CalendarDayCleared)","tags":["District Calendar"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"path","name":"date","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/schools/{schoolId}/calendar-overrides":{"post":{"summary":"Create or replace a school-level calendar override (emits SchoolCalendarDayOverridden)","tags":["District Calendar"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","minimum":0,"maximum":900,"nullable":true},"reason":{"type":"string","maxLength":200,"nullable":true}},"required":["date","dayType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"schoolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"districtCalendarDayId":{"type":"string","format":"uuid"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dayType":{"type":"string","enum":["instructional","half_day","early_dismissal","delayed_opening","holiday","professional_development","teacher_inservice","weekend","emergency_closure","snow_day","other"]},"countsAsInstructional":{"type":"boolean"},"instructionalMinutes":{"type":"integer","nullable":true},"reason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","districtCalendarDayId","date","dayType","countsAsInstructional","instructionalMinutes","reason","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/schools/{schoolId}/calendar-overrides/{date}":{"delete":{"summary":"Clear a school-level calendar override (emits SchoolCalendarOverrideCleared)","tags":["District Calendar"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"schoolId","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"path","name":"date","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district-calendar/school-months":{"get":{"summary":"Enumerate NJDOE school months (20 consecutive instructional days)","tags":["District Calendar"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"months":{"type":"array","items":{"type":"object","properties":{"monthIndex":{"type":"integer","exclusiveMinimum":true,"minimum":0},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"instructionalDayCount":{"type":"integer","minimum":0}},"required":["monthIndex","startDate","endDate","instructionalDayCount"],"additionalProperties":false}}},"required":["schoolYearId","schoolId","months"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/district-calendar/nth-school-day":{"get":{"summary":"Compute the Nth instructional day from a starting date (HIB 10-school-day clock, truancy)","tags":["District Calendar"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":true},{"schema":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":400},"in":"query","name":"n","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"n":{"type":"integer","exclusiveMinimum":true,"minimum":0},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"ranOut":{"type":"boolean"}},"required":["schoolYearId","schoolId","from","n","date","ranOut"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/feature-flags":{"get":{"summary":"Effective feature flags for the current district","tags":["Feature Flags"],"description":"Returns all platform feature flags resolved for this district. District-level overrides take precedence over platform defaults. Expired overrides are ignored.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"source":{"type":"string","enum":["override","default"]}},"required":["key","description","enabled","source"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/help-requests":{"get":{"summary":"My help requests, newest first","tags":["Help Requests"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"minimum":0},"number":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"],"description":"new: not picked up yet · open: support has it · pending: support replied, your move · closed"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","number","subject","status","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Ask YRC Support for help","tags":["Help Requests"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"message":{"type":"string","minLength":10,"maxLength":10000},"priority":{"type":"string","enum":["low","normal","high"],"default":"normal"},"page":{"type":"string","maxLength":300}},"required":["subject","message"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"minimum":0},"number":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"],"description":"new: not picked up yet · open: support has it · pending: support replied, your move · closed"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","number","subject","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/help-requests/{id}":{"get":{"summary":"One of my help requests, with the conversation","tags":["Help Requests"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":true,"minimum":0},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"minimum":0},"number":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"],"description":"new: not picked up yet · open: support has it · pending: support replied, your move · closed"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"fromSupport":{"type":"boolean"},"authorName":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","fromSupport","authorName","body","createdAt"],"additionalProperties":false}}},"required":["id","number","subject","status","createdAt","updatedAt","messages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/help-requests/{id}/replies":{"post":{"summary":"Reply on one of my help requests (reopens it if closed)","tags":["Help Requests"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":10000}},"required":["message"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"integer","exclusiveMinimum":true,"minimum":0},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"minimum":0},"number":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"],"description":"new: not picked up yet · open: support has it · pending: support replied, your move · closed"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","number","subject","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/help-requests/{id}/close":{"post":{"summary":"Close one of my help requests","tags":["Help Requests"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":true,"minimum":0},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"minimum":0},"number":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"],"description":"new: not picked up yet · open: support has it · pending: support replied, your move · closed"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","number","subject","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/modules":{"get":{"summary":"Active modules for the current district","tags":["Modules"],"description":"Per-district module activation, resolved from the reserved `module.*` feature flags. Any authenticated district user may read this — it only reveals which product areas are on.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"modules":{"type":"object","required":["agents","audit","command_center","communication","compliance","construction","data_integrations","dms","esign","facilities","finance","food_service","health","hr","irw","itops","itw","omnisafe","public_records","safety","special_ed","state_reporting","study","substitutes","surveys","teacher_cc","tech_support","time_attendance","transportation","tutoring","video","voice","websites"],"properties":{"agents":{"type":"boolean"},"audit":{"type":"boolean"},"command_center":{"type":"boolean"},"communication":{"type":"boolean"},"compliance":{"type":"boolean"},"construction":{"type":"boolean"},"data_integrations":{"type":"boolean"},"dms":{"type":"boolean"},"esign":{"type":"boolean"},"facilities":{"type":"boolean"},"finance":{"type":"boolean"},"food_service":{"type":"boolean"},"health":{"type":"boolean"},"hr":{"type":"boolean"},"irw":{"type":"boolean"},"itops":{"type":"boolean"},"itw":{"type":"boolean"},"omnisafe":{"type":"boolean"},"public_records":{"type":"boolean"},"safety":{"type":"boolean"},"special_ed":{"type":"boolean"},"state_reporting":{"type":"boolean"},"study":{"type":"boolean"},"substitutes":{"type":"boolean"},"surveys":{"type":"boolean"},"teacher_cc":{"type":"boolean"},"tech_support":{"type":"boolean"},"time_attendance":{"type":"boolean"},"transportation":{"type":"boolean"},"tutoring":{"type":"boolean"},"video":{"type":"boolean"},"voice":{"type":"boolean"},"websites":{"type":"boolean"}},"additionalProperties":false},"workOrdersOnly":{"type":"boolean"},"catalog":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["agents","audit","command_center","communication","compliance","construction","data_integrations","dms","esign","facilities","finance","food_service","health","hr","irw","itops","itw","omnisafe","public_records","safety","special_ed","state_reporting","study","substitutes","surveys","teacher_cc","tech_support","time_attendance","transportation","tutoring","video","voice","websites"]},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"}},"required":["key","name","description","enabled"],"additionalProperties":false}}},"required":["modules","workOrdersOnly","catalog"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/extracurriculars":{"get":{"summary":"List extracurricular activities","tags":["Extracurriculars"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","enum":["sport","club","performing_arts","academic_team","other"]},"in":"query","name":"activityType","required":false},{"schema":{"type":"string","enum":["fall","winter","spring","year_round"]},"in":"query","name":"season","required":false},{"schema":{"type":"string"},"in":"query","name":"isActive","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string"},"name":{"type":"string"},"activityType":{"type":"string"},"season":{"type":"string","nullable":true},"minGpa":{"type":"string","nullable":true},"requiresPhysical":{"type":"boolean"},"requiresConsent":{"type":"boolean"},"maxRosterSize":{"type":"integer","nullable":true},"coachPersonId":{"type":"string","nullable":true},"coachName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","name","activityType","season","minGpa","requiresPhysical","requiresConsent","maxRosterSize","coachPersonId","coachName","isActive","notes","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an extracurricular activity","tags":["Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"activityType":{"type":"string","enum":["sport","club","performing_arts","academic_team","other"]},"season":{"type":"string","enum":["fall","winter","spring","year_round"]},"minGpa":{"type":"number","minimum":0,"maximum":4},"requiresPhysical":{"type":"boolean","default":false},"requiresConsent":{"type":"boolean","default":true},"maxRosterSize":{"type":"integer","minimum":1},"coachPersonId":{"type":"string","format":"uuid"},"coachName":{"type":"string","maxLength":200},"isActive":{"type":"boolean","default":true},"notes":{"type":"string","maxLength":5000}},"required":["schoolId","name","activityType"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string"},"name":{"type":"string"},"activityType":{"type":"string"},"season":{"type":"string","nullable":true},"minGpa":{"type":"string","nullable":true},"requiresPhysical":{"type":"boolean"},"requiresConsent":{"type":"boolean"},"maxRosterSize":{"type":"integer","nullable":true},"coachPersonId":{"type":"string","nullable":true},"coachName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","name","activityType","season","minGpa","requiresPhysical","requiresConsent","maxRosterSize","coachPersonId","coachName","isActive","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}":{"get":{"summary":"Get a single extracurricular activity","tags":["Extracurriculars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string"},"name":{"type":"string"},"activityType":{"type":"string"},"season":{"type":"string","nullable":true},"minGpa":{"type":"string","nullable":true},"requiresPhysical":{"type":"boolean"},"requiresConsent":{"type":"boolean"},"maxRosterSize":{"type":"integer","nullable":true},"coachPersonId":{"type":"string","nullable":true},"coachName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","name","activityType","season","minGpa","requiresPhysical","requiresConsent","maxRosterSize","coachPersonId","coachName","isActive","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an extracurricular activity","tags":["Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"activityType":{"type":"string","enum":["sport","club","performing_arts","academic_team","other"]},"season":{"type":"string","enum":["fall","winter","spring","year_round"]},"minGpa":{"type":"number","minimum":0,"maximum":4,"nullable":true},"requiresPhysical":{"type":"boolean"},"requiresConsent":{"type":"boolean"},"maxRosterSize":{"type":"integer","minimum":1,"nullable":true},"coachPersonId":{"type":"string","format":"uuid","nullable":true},"coachName":{"type":"string","maxLength":200,"nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string"},"name":{"type":"string"},"activityType":{"type":"string"},"season":{"type":"string","nullable":true},"minGpa":{"type":"string","nullable":true},"requiresPhysical":{"type":"boolean"},"requiresConsent":{"type":"boolean"},"maxRosterSize":{"type":"integer","nullable":true},"coachPersonId":{"type":"string","nullable":true},"coachName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","name","activityType","season","minGpa","requiresPhysical","requiresConsent","maxRosterSize","coachPersonId","coachName","isActive","notes","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}/roster":{"get":{"summary":"Get the roster for an extracurricular activity","tags":["Extracurriculars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"extracurricularId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"status":{"type":"string"},"eligibilityCheckedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"consentGivenAt":{"type":"string","format":"date-time","nullable":true},"consentGivenByPersonId":{"type":"string","nullable":true},"enrolledAt":{"type":"string","format":"date-time","nullable":true},"droppedAt":{"type":"string","format":"date-time","nullable":true},"dropReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","extracurricularId","studentPersonId","status","eligibilityCheckedAt","eligibilityNotes","consentGivenAt","consentGivenByPersonId","enrolledAt","droppedAt","dropReason","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a student to the roster (runs eligibility check)","tags":["Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"}},"required":["studentId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"extracurricularId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"status":{"type":"string"},"eligibilityCheckedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"consentGivenAt":{"type":"string","format":"date-time","nullable":true},"consentGivenByPersonId":{"type":"string","nullable":true},"enrolledAt":{"type":"string","format":"date-time","nullable":true},"droppedAt":{"type":"string","format":"date-time","nullable":true},"dropReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","extracurricularId","studentPersonId","status","eligibilityCheckedAt","eligibilityNotes","consentGivenAt","consentGivenByPersonId","enrolledAt","droppedAt","dropReason","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["entry","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}/roster/{studentId}":{"delete":{"summary":"Drop a student from the roster","tags":["Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}/eligibility/{studentId}":{"get":{"summary":"Check eligibility for a single student","tags":["Extracurriculars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"eligible":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"gpaOk":{"type":"boolean"},"physicalOk":{"type":"boolean"},"consentOk":{"type":"boolean"}},"required":["studentId","eligible","reasons","gpaOk","physicalOk","consentOk"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}/consent/{studentId}":{"post":{"summary":"Record parental consent for a student","tags":["Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"givenByPersonId":{"type":"string","format":"uuid"}},"required":["givenByPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/extracurriculars/{id}/eligibility-report":{"get":{"summary":"Run eligibility check for all rostered students and return report","tags":["Extracurriculars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"extracurricularId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"status":{"type":"string"},"eligibilityCheckedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"consentGivenAt":{"type":"string","format":"date-time","nullable":true},"consentGivenByPersonId":{"type":"string","nullable":true},"enrolledAt":{"type":"string","format":"date-time","nullable":true},"droppedAt":{"type":"string","format":"date-time","nullable":true},"dropReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","extracurricularId","studentPersonId","status","eligibilityCheckedAt","eligibilityNotes","consentGivenAt","consentGivenByPersonId","enrolledAt","droppedAt","dropReason","createdAt","updatedAt"],"additionalProperties":false},"eligibility":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"eligible":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"gpaOk":{"type":"boolean"},"physicalOk":{"type":"boolean"},"consentOk":{"type":"boolean"}},"required":["studentId","eligible","reasons","gpaOk","physicalOk","consentOk"],"additionalProperties":false}},"required":["entry","eligibility"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/health/physical-exams":{"post":{"summary":"Record a pre-participation physical examination","tags":["Health","Extracurriculars"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","format":"uuid"},"examDate":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date"},"clearanceStatus":{"type":"string","enum":["cleared","cleared_with_restrictions","not_cleared"]},"restrictions":{"type":"string","maxLength":5000},"physicianName":{"type":"string","maxLength":200},"extracurricularId":{"type":"string","format":"uuid"}},"required":["studentPersonId","examDate","expiresAt","clearanceStatus"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"exam":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"examDate":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date"},"clearanceStatus":{"type":"string"},"restrictions":{"type":"string","nullable":true},"physicianName":{"type":"string","nullable":true},"extracurricularId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","examDate","expiresAt","clearanceStatus","restrictions","physicianName","extracurricularId","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["exam","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"List physical examinations (filter by studentId)","tags":["Health","Extracurriculars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["cleared","cleared_with_restrictions","not_cleared"]},"in":"query","name":"clearanceStatus","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"examDate":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date"},"clearanceStatus":{"type":"string"},"restrictions":{"type":"string","nullable":true},"physicianName":{"type":"string","nullable":true},"extracurricularId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","examDate","expiresAt","clearanceStatus","restrictions","physicianName","extracurricularId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assessments/results":{"get":{"summary":"List assessment results across the district","tags":["Assessments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["njsla","sbac","staar"]},"in":"query","name":"assessmentType","required":false},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"in":"query","name":"testYear","required":false},{"schema":{"type":"string","maxLength":50},"in":"query","name":"subject","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"assessmentType":{"type":"string"},"testYear":{"type":"integer"},"subject":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"scaleScore":{"type":"integer","nullable":true},"performanceLevel":{"type":"integer","nullable":true},"performanceLabel":{"type":"string","nullable":true},"percentileRank":{"type":"integer","nullable":true},"rawScore":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":{}},"importId":{"type":"string","nullable":true},"importedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","assessmentType","testYear","subject","gradeLevel","scaleScore","performanceLevel","performanceLabel","percentileRank","rawScore","metadata","importId","importedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{studentId}/assessment-results":{"get":{"summary":"Get all assessment results for a student","tags":["Assessments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"assessmentType":{"type":"string"},"testYear":{"type":"integer"},"subject":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"scaleScore":{"type":"integer","nullable":true},"performanceLevel":{"type":"integer","nullable":true},"performanceLabel":{"type":"string","nullable":true},"percentileRank":{"type":"integer","nullable":true},"rawScore":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":{}},"importId":{"type":"string","nullable":true},"importedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","assessmentType","testYear","subject","gradeLevel","scaleScore","performanceLevel","performanceLabel","percentileRank","rawScore","metadata","importId","importedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assessments/import/preview":{"post":{"summary":"Preview a CSV import — parse and match students without persisting","tags":["Assessments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"adapter":{"type":"string","enum":["njsla","sbac","staar"]},"filename":{"type":"string","minLength":1,"maxLength":500},"csvText":{"type":"string","minLength":1,"maxLength":52428800}},"required":["adapter","filename","csvText"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"adapter":{"type":"string","enum":["njsla","sbac","staar"]},"filename":{"type":"string"},"totalRows":{"type":"integer"},"validRows":{"type":"integer"},"invalidRows":{"type":"integer"},"unmatchedRows":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"rowIndex":{"type":"integer"},"localStudentId":{"type":"string"},"assessmentType":{"type":"string"},"testYear":{"type":"integer"},"subject":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"scaleScore":{"type":"integer","nullable":true},"performanceLevel":{"type":"integer","nullable":true},"performanceLabel":{"type":"string","nullable":true},"percentileRank":{"type":"integer","nullable":true},"rawScore":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":{}},"matchedStudentPersonId":{"type":"string","format":"uuid","nullable":true},"matchWarning":{"type":"string","nullable":true}},"required":["rowIndex","localStudentId","assessmentType","testYear","subject","gradeLevel","scaleScore","performanceLevel","performanceLabel","percentileRank","rawScore","metadata","matchedStudentPersonId","matchWarning"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"rowIndex":{"type":"integer"},"message":{"type":"string"}},"required":["rowIndex","message"],"additionalProperties":false}}},"required":["adapter","filename","totalRows","validRows","invalidRows","unmatchedRows","rows","errors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assessments/import/apply":{"post":{"summary":"Apply a previewed import — persist assessment results","tags":["Assessments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"adapter":{"type":"string","enum":["njsla","sbac","staar"]},"filename":{"type":"string","minLength":1,"maxLength":500},"rows":{"type":"array","items":{"type":"object","properties":{"localStudentId":{"type":"string"},"assessmentType":{"type":"string"},"testYear":{"type":"integer"},"subject":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"scaleScore":{"type":"integer","nullable":true},"performanceLevel":{"type":"integer","nullable":true},"performanceLabel":{"type":"string","nullable":true},"percentileRank":{"type":"integer","nullable":true},"rawScore":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":{}},"matchedStudentPersonId":{"type":"string","format":"uuid","nullable":true}},"required":["localStudentId","assessmentType","testYear","subject","gradeLevel","scaleScore","performanceLevel","performanceLabel","percentileRank","rawScore","metadata","matchedStudentPersonId"],"additionalProperties":false},"minItems":1,"maxItems":50000}},"required":["adapter","filename","rows"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"importId":{"type":"string","format":"uuid"},"status":{"type":"string"},"totalRows":{"type":"integer"},"successRows":{"type":"integer"},"errorRows":{"type":"integer"},"eventId":{"type":"string","format":"uuid"}},"required":["importId","status","totalRows","successRows","errorRows","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assessments/imports":{"get":{"summary":"List assessment import history","tags":["Assessments"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"adapter":{"type":"string"},"filename":{"type":"string"},"status":{"type":"string"},"totalRows":{"type":"integer"},"processedRows":{"type":"integer"},"successRows":{"type":"integer"},"errorRows":{"type":"integer"},"errorLog":{"type":"array","items":{"type":"object","additionalProperties":{}}},"importedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","adapter","filename","status","totalRows","processedRows","successRows","errorRows","errorLog","importedByUserId","createdAt","completedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/assessments/imports/{id}":{"get":{"summary":"Get an assessment import record","tags":["Assessments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"adapter":{"type":"string"},"filename":{"type":"string"},"status":{"type":"string"},"totalRows":{"type":"integer"},"processedRows":{"type":"integer"},"successRows":{"type":"integer"},"errorRows":{"type":"integer"},"errorLog":{"type":"array","items":{"type":"object","additionalProperties":{}}},"importedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","adapter","filename","status","totalRows","processedRows","successRows","errorRows","errorLog","importedByUserId","createdAt","completedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/students/{studentId}/transfers":{"get":{"summary":"List transfer requests for a student","tags":["Transfers"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"direction":{"type":"string"},"status":{"type":"string"},"receivingDistrictName":{"type":"string","nullable":true},"receivingDistrictId":{"type":"string","nullable":true},"sendingDistrictName":{"type":"string","nullable":true},"adapter":{"type":"string"},"packagedRecordsUrl":{"type":"string","nullable":true},"packagedAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","direction","status","receivingDistrictName","receivingDistrictId","sendingDistrictName","adapter","packagedRecordsUrl","packagedAt","receivedAt","completedAt","transferDate","notes","requestedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Initiate an outbound transfer for a student","tags":["Transfers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"receivingDistrictName":{"type":"string","maxLength":200},"receivingDistrictId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["trex","roeontnet","manual","other"],"default":"manual"},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string","maxLength":5000}},"required":["transferDate"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"studentId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"direction":{"type":"string"},"status":{"type":"string"},"receivingDistrictName":{"type":"string","nullable":true},"receivingDistrictId":{"type":"string","nullable":true},"sendingDistrictName":{"type":"string","nullable":true},"adapter":{"type":"string"},"packagedRecordsUrl":{"type":"string","nullable":true},"packagedAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","direction","status","receivingDistrictName","receivingDistrictId","sendingDistrictName","adapter","packagedRecordsUrl","packagedAt","receivedAt","completedAt","transferDate","notes","requestedByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transfers/{id}":{"get":{"summary":"Get a single transfer request","tags":["Transfers"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"direction":{"type":"string"},"status":{"type":"string"},"receivingDistrictName":{"type":"string","nullable":true},"receivingDistrictId":{"type":"string","nullable":true},"sendingDistrictName":{"type":"string","nullable":true},"adapter":{"type":"string"},"packagedRecordsUrl":{"type":"string","nullable":true},"packagedAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","direction","status","receivingDistrictName","receivingDistrictId","sendingDistrictName","adapter","packagedRecordsUrl","packagedAt","receivedAt","completedAt","transferDate","notes","requestedByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update status or notes on a transfer request","tags":["Transfers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["initiated","pending_records","records_sent","completed","cancelled"]},"notes":{"type":"string","maxLength":5000},"receivingDistrictName":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"direction":{"type":"string"},"status":{"type":"string"},"receivingDistrictName":{"type":"string","nullable":true},"receivingDistrictId":{"type":"string","nullable":true},"sendingDistrictName":{"type":"string","nullable":true},"adapter":{"type":"string"},"packagedRecordsUrl":{"type":"string","nullable":true},"packagedAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"transferDate":{"type":"string","format":"date"},"notes":{"type":"string","nullable":true},"requestedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","studentPersonId","direction","status","receivingDistrictName","receivingDistrictId","sendingDistrictName","adapter","packagedRecordsUrl","packagedAt","receivedAt","completedAt","transferDate","notes","requestedByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transfers/{id}/package-records":{"post":{"summary":"Package student records using the configured adapter","tags":["Transfers"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"transferId":{"type":"string","format":"uuid"},"packagedRecordsUrl":{"type":"string"},"packagedAt":{"type":"string","format":"date-time"},"eventId":{"type":"string","format":"uuid"}},"required":["transferId","packagedRecordsUrl","packagedAt","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/transfers/{id}/complete":{"post":{"summary":"Mark a transfer as completed","tags":["Transfers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":5000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders":{"get":{"summary":"List purchase orders","tags":["Purchase Orders"],"parameters":[{"schema":{"type":"string","enum":["draft","submitted","approved","partially_received","fulfilled","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer"},"in":"query","name":"fiscalYear","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string"},"in":"query","name":"vendorName","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a purchase order draft","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000},"vendorName":{"type":"string","minLength":1,"maxLength":200},"vendorId":{"type":"string","maxLength":100},"vendorRefId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"budgetCode":{"type":"string","maxLength":80},"fiscalYear":{"type":"integer","minimum":2020,"maximum":2099},"notes":{"type":"string","maxLength":10000}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}":{"get":{"summary":"Get a single purchase order with line items and approvals","tags":["Purchase Orders"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update PO metadata (only before approval)","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000},"vendorName":{"type":"string","minLength":1,"maxLength":200},"vendorId":{"type":"string","maxLength":100},"vendorRefId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"budgetCode":{"type":"string","maxLength":80},"fiscalYear":{"type":"integer","minimum":2020,"maximum":2099},"notes":{"type":"string","maxLength":10000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/line-items":{"post":{"summary":"Add a line item to a PO","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"category":{"type":"string","maxLength":100},"accountCode":{"type":"string","maxLength":80},"sortOrder":{"type":"integer","minimum":0,"default":0}},"required":["description","quantity","unitCostCents"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/line-items/{itemId}":{"patch":{"summary":"Update a PO line item","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"integer","minimum":1},"unitCostCents":{"type":"integer","minimum":0},"category":{"type":"string","maxLength":100,"nullable":true},"accountCode":{"type":"string","maxLength":80,"nullable":true},"sortOrder":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a line item from a PO","tags":["Purchase Orders"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/submit":{"post":{"summary":"Submit a draft PO for approval","tags":["Purchase Orders"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/approve":{"post":{"summary":"Approve a submitted PO","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/reject":{"post":{"summary":"Reject a submitted PO","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/receive-items":{"post":{"summary":"Record received quantity for a line item","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lineItemId":{"type":"string","format":"uuid"},"receivedQuantity":{"type":"integer","minimum":0}},"required":["lineItemId","receivedQuantity"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/purchase-orders/{id}/cancel":{"post":{"summary":"Cancel a purchase order","tags":["Purchase Orders"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"poNumber":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"vendorName":{"type":"string"},"vendorId":{"type":"string","nullable":true},"vendorCode":{"type":"string","nullable":true},"status":{"type":"string"},"totalCents":{"type":"integer"},"approvedByUserId":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true},"fulfilledAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"encumbrance":{"type":"object","properties":{"posted":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"accountCode":{"type":"string"},"amount":{"type":"number"}},"required":["accountId","accountCode","amount"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"accountCode":{"type":"string","nullable":true},"amount":{"type":"number"},"reason":{"type":"string"}},"required":["accountCode","amount","reason"],"additionalProperties":false}}},"required":["posted","skipped"],"additionalProperties":false},"released":{"type":"object","properties":{"liquidated":{"type":"number"},"entries":{"type":"number"}},"required":["liquidated","entries"],"additionalProperties":false,"nullable":true},"budgetCode":{"type":"string","nullable":true},"fiscalYear":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true},"createdByUserId":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"description":{"type":"string"},"quantity":{"type":"integer"},"unitCostCents":{"type":"integer"},"totalCents":{"type":"integer"},"receivedQuantity":{"type":"integer"},"category":{"type":"string","nullable":true},"accountCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","sortOrder","description","quantity","unitCostCents","totalCents","receivedQuantity","category","accountCode","createdAt","updatedAt"],"additionalProperties":false}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"approverUserId":{"type":"string","format":"uuid"},"decision":{"type":"string"},"decisionAt":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","purchaseOrderId","approverUserId","decision","decisionAt","notes","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","poNumber","title","description","vendorName","vendorId","vendorCode","status","totalCents","approvedByUserId","approvedAt","fulfilledAt","cancelledAt","cancelledReason","budgetCode","fiscalYear","notes","createdByUserId","lineItems","approvals","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/activities":{"get":{"summary":"List PD activities","tags":["Professional Development"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"upcoming","required":false},{"schema":{"type":"string","enum":["workshop","conference","course","webinar","coaching","observation","other"]},"in":"query","name":"activityType","required":false},{"schema":{"type":"string","enum":["pd_hours","ceu","graduate_credit","other"]},"in":"query","name":"creditType","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"activityType":{"type":"string"},"provider":{"type":"string","nullable":true},"creditHours":{"type":"string"},"creditType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date","nullable":true},"location":{"type":"string","nullable":true},"maxEnrollment":{"type":"integer","nullable":true},"isDistrictSponsored":{"type":"boolean"},"certRenewalCategoryCode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"enrollmentCount":{"type":"integer"},"completionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","activityType","provider","creditHours","creditType","issuedAt","endsAt","location","maxEnrollment","isDistrictSponsored","certRenewalCategoryCode","notes","enrollmentCount","completionCount","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a PD activity","tags":["Professional Development"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000},"activityType":{"type":"string","enum":["workshop","conference","course","webinar","coaching","observation","other"]},"provider":{"type":"string","maxLength":200},"creditHours":{"type":"number","minimum":0.1,"maximum":999.9},"creditType":{"type":"string","enum":["pd_hours","ceu","graduate_credit","other"],"default":"pd_hours"},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date"},"location":{"type":"string","maxLength":300},"maxEnrollment":{"type":"integer","minimum":1},"isDistrictSponsored":{"type":"boolean","default":false},"certRenewalCategoryCode":{"type":"string","maxLength":60},"notes":{"type":"string","maxLength":10000}},"required":["title","activityType","creditHours","issuedAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"activityType":{"type":"string"},"provider":{"type":"string","nullable":true},"creditHours":{"type":"string"},"creditType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date","nullable":true},"location":{"type":"string","nullable":true},"maxEnrollment":{"type":"integer","nullable":true},"isDistrictSponsored":{"type":"boolean"},"certRenewalCategoryCode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"enrollmentCount":{"type":"integer"},"completionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","activityType","provider","creditHours","creditType","issuedAt","endsAt","location","maxEnrollment","isDistrictSponsored","certRenewalCategoryCode","notes","enrollmentCount","completionCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/activities/{id}":{"get":{"summary":"Get a PD activity with enrollment and completion counts","tags":["Professional Development"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"activityType":{"type":"string"},"provider":{"type":"string","nullable":true},"creditHours":{"type":"string"},"creditType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date","nullable":true},"location":{"type":"string","nullable":true},"maxEnrollment":{"type":"integer","nullable":true},"isDistrictSponsored":{"type":"boolean"},"certRenewalCategoryCode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"enrollmentCount":{"type":"integer"},"completionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","activityType","provider","creditHours","creditType","issuedAt","endsAt","location","maxEnrollment","isDistrictSponsored","certRenewalCategoryCode","notes","enrollmentCount","completionCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a PD activity","tags":["Professional Development"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000,"nullable":true},"activityType":{"type":"string","enum":["workshop","conference","course","webinar","coaching","observation","other"]},"provider":{"type":"string","maxLength":200,"nullable":true},"creditHours":{"type":"number","minimum":0.1,"maximum":999.9},"creditType":{"type":"string","enum":["pd_hours","ceu","graduate_credit","other"]},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date","nullable":true},"location":{"type":"string","maxLength":300,"nullable":true},"maxEnrollment":{"type":"integer","minimum":1,"nullable":true},"isDistrictSponsored":{"type":"boolean"},"certRenewalCategoryCode":{"type":"string","maxLength":60,"nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"activityType":{"type":"string"},"provider":{"type":"string","nullable":true},"creditHours":{"type":"string"},"creditType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"endsAt":{"type":"string","format":"date","nullable":true},"location":{"type":"string","nullable":true},"maxEnrollment":{"type":"integer","nullable":true},"isDistrictSponsored":{"type":"boolean"},"certRenewalCategoryCode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"enrollmentCount":{"type":"integer"},"completionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","activityType","provider","creditHours","creditType","issuedAt","endsAt","location","maxEnrollment","isDistrictSponsored","certRenewalCategoryCode","notes","enrollmentCount","completionCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/activities/{id}/enroll":{"post":{"summary":"Enroll a staff member in a PD activity","tags":["Professional Development"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"}},"required":["staffPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"activityId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"enrolledAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","activityId","staffPersonId","enrolledAt","status","cancelledAt","cancelledReason","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/activities/{id}/enroll/{staffPersonId}":{"delete":{"summary":"Cancel enrollment for a staff member","tags":["Professional Development"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"staffPersonId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"activityId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"enrolledAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelledReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","activityId","staffPersonId","enrolledAt","status","cancelledAt","cancelledReason","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/activities/{id}/complete":{"post":{"summary":"Record completion for a staff member","tags":["Professional Development"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"},"completedAt":{"type":"string","format":"date"},"creditHoursEarned":{"type":"number","minimum":0.1,"maximum":999.9},"certificateUrl":{"type":"string","format":"uri"},"notes":{"type":"string","maxLength":5000}},"required":["staffPersonId","completedAt","creditHoursEarned"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"completion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"activityId":{"type":"string","format":"uuid"},"enrollmentId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"completedAt":{"type":"string","format":"date"},"creditHoursEarned":{"type":"string"},"certificateUrl":{"type":"string","nullable":true},"verifiedByUserId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"activityTitle":{"type":"string"},"activityType":{"type":"string"},"creditType":{"type":"string"},"certRenewalCategoryCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","activityId","enrollmentId","staffPersonId","completedAt","creditHoursEarned","certificateUrl","verifiedByUserId","notes","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["completion","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/staff/{personId}/history":{"get":{"summary":"All PD completions for a staff member","tags":["Professional Development"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"activityId":{"type":"string","format":"uuid"},"enrollmentId":{"type":"string","format":"uuid"},"staffPersonId":{"type":"string","format":"uuid"},"completedAt":{"type":"string","format":"date"},"creditHoursEarned":{"type":"string"},"certificateUrl":{"type":"string","nullable":true},"verifiedByUserId":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"activityTitle":{"type":"string"},"activityType":{"type":"string"},"creditType":{"type":"string"},"certRenewalCategoryCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","activityId","enrollmentId","staffPersonId","completedAt","creditHoursEarned","certificateUrl","verifiedByUserId","notes","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/staff/{personId}/credits-summary":{"get":{"summary":"PD credit hour totals by type and cert renewal category for a staff member","tags":["Professional Development"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"staffPersonId":{"type":"string","format":"uuid"},"totalHours":{"type":"number"},"byType":{"type":"object","additionalProperties":{"type":"number"}},"byCategory":{"type":"object","additionalProperties":{"type":"number"}}},"required":["staffPersonId","totalHours","byType","byCategory"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/pd/staff-search":{"get":{"summary":"Find staff by name for PD enrollment and completion","tags":["Professional Development"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"query","name":"q","required":true},{"schema":{"type":"integer","minimum":1,"maximum":25,"default":10},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"jobTitle":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["personId","firstName","lastName","jobTitle","schoolName"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/volunteers/{personId}/clearances":{"get":{"summary":"List clearances for a volunteer","tags":["Volunteers"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"clearanceType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date","nullable":true},"status":{"type":"string"},"issuingAgency":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","personId","clearanceType","issuedAt","expiresAt","status","issuingAgency","documentUrl","revokedAt","revokedReason","notes","recordedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a new clearance for a volunteer","tags":["Volunteers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clearanceType":{"type":"string","enum":["criminal_background","child_abuse","sex_offender","drug_test","fingerprint","other"]},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date"},"issuingAgency":{"type":"string","maxLength":200},"documentUrl":{"type":"string","format":"uri","maxLength":500},"notes":{"type":"string","maxLength":5000}},"required":["clearanceType","issuedAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"clearanceType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date","nullable":true},"status":{"type":"string"},"issuingAgency":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","personId","clearanceType","issuedAt","expiresAt","status","issuingAgency","documentUrl","revokedAt","revokedReason","notes","recordedByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/volunteers/clearances/expiring-soon":{"get":{"summary":"List active clearances expiring within 30 days","tags":["Volunteers"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"clearanceType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date","nullable":true},"status":{"type":"string"},"issuingAgency":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","personId","clearanceType","issuedAt","expiresAt","status","issuingAgency","documentUrl","revokedAt","revokedReason","notes","recordedByUserId","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/volunteers/clearances/{id}":{"patch":{"summary":"Update a clearance record","tags":["Volunteers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clearanceType":{"type":"string","enum":["criminal_background","child_abuse","sex_offender","drug_test","fingerprint","other"]},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date","nullable":true},"status":{"type":"string","enum":["active","expired","revoked"]},"issuingAgency":{"type":"string","maxLength":200,"nullable":true},"documentUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"clearanceType":{"type":"string"},"issuedAt":{"type":"string","format":"date"},"expiresAt":{"type":"string","format":"date","nullable":true},"status":{"type":"string"},"issuingAgency":{"type":"string","nullable":true},"documentUrl":{"type":"string","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"revokedReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"recordedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","personId","clearanceType","issuedAt","expiresAt","status","issuingAgency","documentUrl","revokedAt","revokedReason","notes","recordedByUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/volunteers/clearances/{id}/revoke":{"post":{"summary":"Revoke a volunteer clearance","tags":["Volunteers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings":{"get":{"summary":"List board meetings","tags":["Board"],"parameters":[{"schema":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"includeCompleted","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"status":{"type":"string"},"videoUrl":{"type":"string","nullable":true},"minutesPublishedAt":{"type":"string","format":"date-time","nullable":true},"agendaItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false}},"minutes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"minutesText":{"type":"string"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","minutesText","approvedAt","approvedByUserId","publishedAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","meetingType","scheduledAt","location","status","videoUrl","minutesPublishedAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a new board meeting","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"meetingType":{"type":"string","enum":["regular","special","executive_session","emergency"]},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","maxLength":500},"videoUrl":{"type":"string","format":"uri","maxLength":500}},"required":["title","meetingType","scheduledAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"status":{"type":"string"},"videoUrl":{"type":"string","nullable":true},"minutesPublishedAt":{"type":"string","format":"date-time","nullable":true},"agendaItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false}},"minutes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"minutesText":{"type":"string"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","minutesText","approvedAt","approvedByUserId","publishedAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","meetingType","scheduledAt","location","status","videoUrl","minutesPublishedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings/{id}":{"get":{"summary":"Get a board meeting with agenda items and minutes","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"status":{"type":"string"},"videoUrl":{"type":"string","nullable":true},"minutesPublishedAt":{"type":"string","format":"date-time","nullable":true},"agendaItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false}},"minutes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"minutesText":{"type":"string"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","minutesText","approvedAt","approvedByUserId","publishedAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","meetingType","scheduledAt","location","status","videoUrl","minutesPublishedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a board meeting","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"meetingType":{"type":"string","enum":["regular","special","executive_session","emergency"]},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","maxLength":500,"nullable":true},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"videoUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"location":{"type":"string","nullable":true},"status":{"type":"string"},"videoUrl":{"type":"string","nullable":true},"minutesPublishedAt":{"type":"string","format":"date-time","nullable":true},"agendaItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false}},"minutes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"minutesText":{"type":"string"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","minutesText","approvedAt","approvedByUserId","publishedAt","createdAt","updatedAt"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","meetingType","scheduledAt","location","status","videoUrl","minutesPublishedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings/{id}/agenda":{"post":{"summary":"Add an agenda item to a meeting","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sortOrder":{"type":"integer","minimum":0},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000},"presenter":{"type":"string","maxLength":200},"estimatedMinutes":{"type":"integer","minimum":1},"actionRequired":{"type":"boolean","default":false},"attachmentUrl":{"type":"string","format":"uri","maxLength":500}},"required":["sortOrder","title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings/{id}/agenda/{itemId}":{"patch":{"summary":"Update an agenda item","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sortOrder":{"type":"integer","minimum":0},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000,"nullable":true},"presenter":{"type":"string","maxLength":200,"nullable":true},"estimatedMinutes":{"type":"integer","minimum":1,"nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"sortOrder":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"presenter":{"type":"string","nullable":true},"estimatedMinutes":{"type":"integer","nullable":true},"actionRequired":{"type":"boolean"},"attachmentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","sortOrder","title","description","presenter","estimatedMinutes","actionRequired","attachmentUrl","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove an agenda item","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings/{id}/minutes":{"post":{"summary":"Create or update meeting minutes","tags":["Board"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"minutesText":{"type":"string","minLength":1}},"required":["minutesText"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"meetingId":{"type":"string","format":"uuid"},"minutesText":{"type":"string"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"approvedByUserId":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","meetingId","minutesText","approvedAt","approvedByUserId","publishedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/board/meetings/{id}/publish-minutes":{"post":{"summary":"Publish meeting minutes publicly","tags":["Board"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/public/board/meetings/{districtId}":{"get":{"summary":"Public: upcoming meetings with published minutes for a district","tags":["Board","Public"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/opra/requests":{"get":{"summary":"List OPRA requests","tags":["OPRA"],"parameters":[{"schema":{"type":"string","enum":["received","in_review","fulfilled","denied","appealed"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"dueWithin","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"requestorName":{"type":"string"},"requestorEmail":{"type":"string","nullable":true},"requestorPhone":{"type":"string","nullable":true},"requestorAddress":{"type":"string","nullable":true},"description":{"type":"string"},"requestedAt":{"type":"string","format":"date"},"dueAt":{"type":"string","format":"date"},"status":{"type":"string"},"responseUrl":{"type":"string","nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","requestorName","requestorEmail","requestorPhone","requestorAddress","description","requestedAt","dueAt","status","responseUrl","responseSentAt","denialReason","internalNotes","assignedToUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a new OPRA request (auto-computes 7-business-day deadline)","tags":["OPRA"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requestorName":{"type":"string","minLength":1,"maxLength":200},"requestorEmail":{"type":"string","format":"email","maxLength":200},"requestorPhone":{"type":"string","maxLength":30},"requestorAddress":{"type":"string","maxLength":500},"description":{"type":"string","minLength":1},"requestedAt":{"type":"string","format":"date"}},"required":["requestorName","description","requestedAt"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"requestorName":{"type":"string"},"requestorEmail":{"type":"string","nullable":true},"requestorPhone":{"type":"string","nullable":true},"requestorAddress":{"type":"string","nullable":true},"description":{"type":"string"},"requestedAt":{"type":"string","format":"date"},"dueAt":{"type":"string","format":"date"},"status":{"type":"string"},"responseUrl":{"type":"string","nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","requestorName","requestorEmail","requestorPhone","requestorAddress","description","requestedAt","dueAt","status","responseUrl","responseSentAt","denialReason","internalNotes","assignedToUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/opra/requests/overdue":{"get":{"summary":"List overdue OPRA requests (past due date, not fulfilled or denied)","tags":["OPRA"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"requestorName":{"type":"string"},"requestorEmail":{"type":"string","nullable":true},"requestorPhone":{"type":"string","nullable":true},"requestorAddress":{"type":"string","nullable":true},"description":{"type":"string"},"requestedAt":{"type":"string","format":"date"},"dueAt":{"type":"string","format":"date"},"status":{"type":"string"},"responseUrl":{"type":"string","nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","requestorName","requestorEmail","requestorPhone","requestorAddress","description","requestedAt","dueAt","status","responseUrl","responseSentAt","denialReason","internalNotes","assignedToUserId","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/opra/requests/{id}":{"get":{"summary":"Get a single OPRA request","tags":["OPRA"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"requestorName":{"type":"string"},"requestorEmail":{"type":"string","nullable":true},"requestorPhone":{"type":"string","nullable":true},"requestorAddress":{"type":"string","nullable":true},"description":{"type":"string"},"requestedAt":{"type":"string","format":"date"},"dueAt":{"type":"string","format":"date"},"status":{"type":"string"},"responseUrl":{"type":"string","nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","requestorName","requestorEmail","requestorPhone","requestorAddress","description","requestedAt","dueAt","status","responseUrl","responseSentAt","denialReason","internalNotes","assignedToUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an OPRA request status, response, notes, or assignment","tags":["OPRA"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["received","in_review","fulfilled","denied","appealed"]},"responseUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","maxLength":500,"nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"requestorName":{"type":"string"},"requestorEmail":{"type":"string","nullable":true},"requestorPhone":{"type":"string","nullable":true},"requestorAddress":{"type":"string","nullable":true},"description":{"type":"string"},"requestedAt":{"type":"string","format":"date"},"dueAt":{"type":"string","format":"date"},"status":{"type":"string"},"responseUrl":{"type":"string","nullable":true},"responseSentAt":{"type":"string","format":"date-time","nullable":true},"denialReason":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"assignedToUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","requestorName","requestorEmail","requestorPhone","requestorAddress","description","requestedAt","dueAt","status","responseUrl","responseSentAt","denialReason","internalNotes","assignedToUserId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/time-machine/students/{personId}":{"get":{"summary":"Rebuild a student record as it stood on a given date","tags":["Records"],"description":"Rows that carry effective dates are filtered to the as-of date, which is a true reconstruction. Demographics have no history table and are returned as current values, with every event since the as-of date listed so the reader can see what moved.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"asOf","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"asOf":{"type":"string"},"generatedAt":{"type":"string"},"student":{"type":"object","properties":{"id":{"type":"string"},"localId":{"type":"string"},"name":{"type":"string"}},"required":["id","localId","name"],"additionalProperties":false},"basis":{"type":"object","properties":{"dated":{"type":"array","items":{"type":"string"}},"undated":{"type":"array","items":{"type":"string"}},"note":{"type":"string"},"recordCreatedAfterAsOf":{"type":"boolean"},"recordCreatedAt":{"type":"string"}},"required":["dated","undated","note","recordCreatedAfterAsOf","recordCreatedAt"],"additionalProperties":false},"record":{"type":"object","additionalProperties":{}},"changesSince":{"type":"object","properties":{"eventCount":{"type":"integer"},"byType":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string"},"count":{"type":"integer"}},"required":["eventType","count"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventType":{"type":"string"},"occurredAt":{"type":"string"},"actorId":{"type":"string","nullable":true}},"required":["id","eventType","occurredAt","actorId"],"additionalProperties":false}}},"required":["eventCount","byType","recent"],"additionalProperties":false},"digest":{"type":"string"}},"required":["asOf","generatedAt","student","basis","record","changesSince","digest"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/time-machine/students/{personId}/timeline":{"get":{"summary":"Every recorded change to one student, oldest first","tags":["Records"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventType":{"type":"string"},"occurredAt":{"type":"string"},"actorName":{"type":"string","nullable":true},"actorType":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"restricted":{"type":"boolean"}},"required":["id","eventType","occurredAt","actorName","actorType","payload","restricted"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/time-machine/packet":{"post":{"summary":"Assemble a records-request packet with a release decision per section","tags":["Records"],"description":"Rebuilds each named student as of the date, then classifies every section against the FERPA/OPRA rule table. Nothing is redacted silently: the clerk gets a list of what is releasable, what needs a look and what is exempt, each with the authority it rests on.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"opraRequestId":{"type":"string","format":"uuid"},"personIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"requestorName":{"type":"string","maxLength":200},"basis":{"type":"string","enum":["opra","ferpa_parent"],"default":"opra"}},"required":["personIds","asOf"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cover":{"type":"object","additionalProperties":{}},"students":{"type":"array","items":{"type":"object","additionalProperties":{}}},"digest":{"type":"string"}},"required":["cover","students","digest"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/child-find/referrals":{"get":{"summary":"List Child Find referrals","tags":["ChildFind"],"parameters":[{"schema":{"type":"string","enum":["pending","eligible","not_eligible","evaluation_in_progress"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"evaluationDueSoon","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a new Child Find referral (validates IDEA age window)","tags":["ChildFind"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string","enum":["parent","teacher","physician","self_referral","community","other"]},"referralReason":{"type":"string","minLength":1},"dateOfBirth":{"type":"string","format":"date"},"assignedEvaluatorId":{"type":"string","format":"uuid"}},"required":["referredPersonId","referralDate","referralSource","referralReason","dateOfBirth"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/child-find/referrals/evaluation-due-soon":{"get":{"summary":"List referrals with evaluation deadlines within 14 days","tags":["ChildFind"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/child-find/referrals/{id}":{"get":{"summary":"Get a Child Find referral","tags":["ChildFind"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a Child Find referral","tags":["ChildFind"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eligibilityStatus":{"type":"string","enum":["pending","eligible","not_eligible","evaluation_in_progress"]},"eligibilityNotes":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","format":"uuid","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"referralReason":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/child-find/referrals/{id}/determine-eligibility":{"post":{"summary":"Record eligibility determination for a referral","tags":["ChildFind"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eligibilityStatus":{"type":"string","enum":["pending","eligible","not_eligible","evaluation_in_progress"]},"notes":{"type":"string"}},"required":["eligibilityStatus"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"}},"required":["eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/child-find/referrals/{id}/create-iep":{"post":{"summary":"Mark IEP as created from this referral","tags":["ChildFind"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"iepId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"referredPersonId":{"type":"string","format":"uuid"},"referralDate":{"type":"string","format":"date"},"referralSource":{"type":"string"},"referralReason":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"ageAtReferral":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityDeterminedAt":{"type":"string","format":"date-time","nullable":true},"eligibilityNotes":{"type":"string","nullable":true},"iepCreatedFromReferral":{"type":"boolean"},"iepId":{"type":"string","nullable":true},"assignedEvaluatorId":{"type":"string","nullable":true},"evaluationDueAt":{"type":"string","format":"date","nullable":true},"outcomeNotes":{"type":"string","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","referredPersonId","referralDate","referralSource","referralReason","dateOfBirth","ageAtReferral","eligibilityStatus","eligibilityDeterminedAt","eligibilityNotes","iepCreatedFromReferral","iepId","assignedEvaluatorId","evaluationDueAt","outcomeNotes","closedAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/kiosk-info":{"get":{"summary":"Return district/school branding for the public kiosk","tags":["Visitor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"districtName":{"type":"string"},"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string","nullable":true},"districtLogoUrl":{"type":"string","nullable":true}},"required":["districtId","districtName","schoolId","schoolName","districtLogoUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/check-in":{"post":{"summary":"Check a visitor in (emits VisitorCheckedIn)","tags":["Visitor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"visitorName":{"type":"string","minLength":1,"maxLength":200},"visitorCompany":{"type":"string","maxLength":200},"visitorPhone":{"type":"string","maxLength":30},"visitorEmail":{"type":"string","format":"email","maxLength":200},"visitorIdType":{"type":"string","enum":["DRIVERS_LICENSE","PASSPORT","OTHER"]},"visitorIdNumber":{"type":"string","maxLength":100},"purpose":{"type":"string","enum":["STUDENT_PICKUP","MEETING","VOLUNTEER","CONTRACTOR","OTHER"]},"purposeNotes":{"type":"string","maxLength":500},"hostPersonId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"skipSexOffenderCheck":{"type":"boolean","default":false},"visitorDateOfBirth":{"type":"string","format":"date"},"visitorState":{"type":"string","minLength":2,"maxLength":2},"visitorAliases":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":10},"visitorPhoto":{"type":"string","maxLength":400000,"pattern":"^data:image\\/(jpeg|png|webp);base64,"},"preRegistrationCode":{"type":"string","maxLength":12}},"required":["visitorName","purpose"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["visitor","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/active":{"get":{"summary":"List visitors currently checked in","tags":["Visitor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor":{"get":{"summary":"List visitor log entries (paginated)","tags":["Visitor"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["CHECKED_IN","CHECKED_OUT","DENIED"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/{id}":{"get":{"summary":"Get a single visitor log entry","tags":["Visitor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false}},"required":["visitor"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Permanently delete a visitor log entry (emits VisitorDeleted)","tags":["Visitor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"}},"required":["id","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/{id}/check-out":{"post":{"summary":"Check a visitor out (emits VisitorCheckedOut)","tags":["Visitor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["visitor","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/{id}/screening-verdict":{"post":{"summary":"Record the result of a manual registry review (emits VisitorScreeningResolved)","tags":["Visitor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["CLEAR","FLAGGED"]},"note":{"type":"string","maxLength":500}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["visitor","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/{id}/deny":{"post":{"summary":"Deny a visitor entry (emits VisitorDenied)","tags":["Visitor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"denialReason":{"type":"string","minLength":1,"maxLength":500}},"required":["denialReason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid","nullable":true},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"visitorIdType":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"hostPersonId":{"type":"string","format":"uuid","nullable":true},"studentPersonId":{"type":"string","format":"uuid","nullable":true},"checkInAt":{"type":"string","format":"date-time"},"checkOutAt":{"type":"string","format":"date-time","nullable":true},"badgeNumber":{"type":"string","nullable":true},"sexOffenderCheckStatus":{"type":"string"},"sexOffenderCheckAt":{"type":"string","format":"date-time","nullable":true},"screeningSummary":{"type":"object","properties":{"watchlist":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"level":{"type":"string"},"reason":{"type":"string"}},"required":["entryId","fullName","level","reason"],"additionalProperties":false}},"custody":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid","nullable":true},"personName":{"type":"string"},"orderType":{"type":"string"},"restrictions":{"type":"array","items":{"type":"string"}},"caseNumber":{"type":"string","nullable":true}},"required":["personId","personName","orderType","restrictions","caseNumber"],"additionalProperties":false}},"pickup":{"type":"object","properties":{"status":{"type":"string","enum":["approved","not_approved","not_on_list","not_applicable"]},"guardianName":{"type":"string","nullable":true},"relationshipType":{"type":"string","nullable":true}},"required":["status","guardianName","relationshipType"],"additionalProperties":false}},"required":["watchlist","custody","pickup"],"additionalProperties":false,"nullable":true},"visitorPhoto":{"type":"string","nullable":true},"status":{"type":"string"},"denialReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","visitorName","visitorCompany","visitorPhone","visitorEmail","visitorIdType","purpose","purposeNotes","hostPersonId","studentPersonId","checkInAt","checkOutAt","badgeNumber","sexOffenderCheckStatus","sexOffenderCheckAt","screeningSummary","visitorPhoto","status","denialReason","createdAt","updatedAt"],"additionalProperties":false},"eventId":{"type":"string","format":"uuid"}},"required":["visitor","eventId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety/watchlist":{"get":{"summary":"List district watchlist entries","tags":["Safety"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"aliases":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"level":{"type":"string"},"reason":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","fullName","aliases","dateOfBirth","level","reason","expiresAt","isActive","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a watchlist entry (emits WatchlistEntryAdded)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"maxLength":200},"aliases":{"type":"string","maxLength":500},"dateOfBirth":{"type":"string","format":"date"},"level":{"type":"string","enum":["deny","alert"],"default":"alert"},"reason":{"type":"string","minLength":1,"maxLength":500},"expiresAt":{"type":"string","format":"date-time"}},"required":["fullName","reason"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"aliases":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"level":{"type":"string"},"reason":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","fullName","aliases","dateOfBirth","level","reason","expiresAt","isActive","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety/watchlist/{id}":{"patch":{"summary":"Edit or deactivate a watchlist entry (emits WatchlistEntryUpdated)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"maxLength":200},"aliases":{"type":"string","maxLength":500,"nullable":true},"dateOfBirth":{"type":"string","format":"date","nullable":true},"level":{"type":"string","enum":["deny","alert"]},"reason":{"type":"string","minLength":1,"maxLength":500},"expiresAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"fullName":{"type":"string"},"aliases":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"level":{"type":"string"},"reason":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","fullName","aliases","dateOfBirth","level","reason","expiresAt","isActive","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/safety/visitors/dashboard":{"get":{"summary":"Visitor safety analytics for a date window","tags":["Safety"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"in":"query","name":"days","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"totals":{"type":"object","properties":{"visits":{"type":"integer","minimum":0},"onCampus":{"type":"integer","minimum":0},"denied":{"type":"integer","minimum":0},"flagged":{"type":"integer","minimum":0},"watchlistHits":{"type":"integer","minimum":0},"custodyHits":{"type":"integer","minimum":0},"avgVisitMinutes":{"type":"number","nullable":true}},"required":["visits","onCampus","denied","flagged","watchlistHits","custodyHits","avgVisitMinutes"],"additionalProperties":false},"byPurpose":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string"},"visits":{"type":"integer","minimum":0}},"required":["purpose","visits"],"additionalProperties":false}},"bySchool":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string","format":"uuid","nullable":true},"schoolName":{"type":"string"},"visits":{"type":"integer","minimum":0},"denied":{"type":"integer","minimum":0},"flagged":{"type":"integer","minimum":0}},"required":["schoolId","schoolName","visits","denied","flagged"],"additionalProperties":false}},"byHour":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"visits":{"type":"integer","minimum":0}},"required":["hour","visits"],"additionalProperties":false}}},"required":["from","totals","byPurpose","bySchool","byHour"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/pre-registrations":{"get":{"summary":"List visitor pre-registrations","tags":["Safety"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"code":{"type":"string"},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"studentPersonId":{"type":"string","nullable":true},"validFrom":{"type":"string"},"validUntil":{"type":"string"},"usedCount":{"type":"integer","minimum":0},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","code","visitorName","visitorCompany","visitorPhone","visitorEmail","purpose","purposeNotes","schoolId","studentPersonId","validFrom","validUntil","usedCount","lastUsedAt","isActive","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Pre-register a visitor (emits VisitorPreRegistered)","tags":["Safety"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visitorName":{"type":"string","minLength":1,"maxLength":200},"visitorCompany":{"type":"string","maxLength":200},"visitorPhone":{"type":"string","maxLength":30},"visitorEmail":{"type":"string","format":"email","maxLength":200},"purpose":{"type":"string","enum":["STUDENT_PICKUP","MEETING","VOLUNTEER","CONTRACTOR","OTHER"]},"purposeNotes":{"type":"string","maxLength":500},"schoolId":{"type":"string","format":"uuid"},"studentPersonId":{"type":"string","format":"uuid"},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"}},"required":["visitorName","purpose","validFrom","validUntil"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"code":{"type":"string"},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"studentPersonId":{"type":"string","nullable":true},"validFrom":{"type":"string"},"validUntil":{"type":"string"},"usedCount":{"type":"integer","minimum":0},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","code","visitorName","visitorCompany","visitorPhone","visitorEmail","purpose","purposeNotes","schoolId","studentPersonId","validFrom","validUntil","usedCount","lastUsedAt","isActive","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/visitor/pre-registrations/lookup":{"get":{"summary":"Resolve a pre-registration fast-lane code","tags":["Safety"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":12},"in":"query","name":"code","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"code":{"type":"string"},"visitorName":{"type":"string"},"visitorCompany":{"type":"string","nullable":true},"visitorPhone":{"type":"string","nullable":true},"visitorEmail":{"type":"string","nullable":true},"purpose":{"type":"string"},"purposeNotes":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"studentPersonId":{"type":"string","nullable":true},"validFrom":{"type":"string"},"validUntil":{"type":"string"},"usedCount":{"type":"integer","minimum":0},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","districtId","code","visitorName","visitorCompany","visitorPhone","visitorEmail","purpose","purposeNotes","schoolId","studentPersonId","validFrom","validUntil","usedCount","lastUsedAt","isActive","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/facilities/report-info":{"get":{"summary":"Names for the public QR issue-report page","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"schoolId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"roomId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtName":{"type":"string"},"schoolName":{"type":"string"},"roomLabel":{"type":"string","nullable":true}},"required":["districtName","schoolName","roomLabel"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/facilities/report-issue":{"post":{"summary":"Submit a facilities issue from a room QR code (creates a work order)","tags":["Facilities"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["custodial","plumbing","electrical","hvac","safety","other"],"default":"custodial"},"description":{"type":"string","minLength":10,"maxLength":1000},"reporterName":{"type":"string","maxLength":120},"reporterContact":{"type":"string","maxLength":200},"website":{"type":"string","maxLength":200}},"required":["districtId","schoolId","description"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ticketNumber":{"type":"string"},"status":{"type":"string"}},"required":["ticketNumber","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/public/facility-reviews":{"get":{"summary":"A district's published year-end facility reviews","tags":["Facilities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtName":{"type":"string"},"reviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true}},"required":["id","buildingId","buildingName","title","schoolYear","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken"],"additionalProperties":false}}},"required":["districtName","reviews"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/public/facility-reviews/{token}":{"get":{"summary":"A published year-end facility review","tags":["Facilities"],"parameters":[{"schema":{"type":"string","minLength":20,"maxLength":64},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtName":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"buildingId":{"type":"string","format":"uuid"},"buildingName":{"type":"string"},"title":{"type":"string"},"schoolYear":{"type":"string"},"assessedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"assessorName":{"type":"string","nullable":true},"totalEstimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"facilityConditionIndex":{"type":"number","nullable":true},"conditionRating":{"type":"string","enum":["excellent","good","fair","poor","critical"],"nullable":true},"deficiencyCount":{"type":"integer","minimum":0},"publishedAt":{"type":"string","format":"date-time","nullable":true},"publicToken":{"type":"string","nullable":true},"facilityType":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"yearBuilt":{"type":"integer","nullable":true},"squareFeet":{"type":"integer","nullable":true},"replacementValue":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"deferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"effectiveDeferredMaintenanceCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"correctiveActions":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"action":{"type":"string","minLength":1,"maxLength":1000},"targetCompletion":{"type":"string","maxLength":60,"nullable":true}},"required":["priority","action"],"additionalProperties":false}},"notes":{"type":"string","nullable":true},"conditionCounts":{"type":"object","properties":{"good":{"type":"integer"},"fair":{"type":"integer"},"poor":{"type":"integer"},"na":{"type":"integer"},"unanswered":{"type":"integer"}},"required":["good","fair","poor","na","unanswered"],"additionalProperties":false},"deficiencyLog":{"type":"array","items":{"type":"object","properties":{"deficiency":{"type":"string"},"location":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true}},"required":["deficiency","location","priority","estimatedCost","recommendedAction"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"questionId":{"type":"string","format":"uuid","nullable":true},"section":{"type":"string"},"prompt":{"type":"string"},"answerType":{"type":"string","enum":["condition","text","number","currency","date"]},"position":{"type":"integer"},"condition":{"type":"string","enum":["good","fair","poor","na"],"nullable":true},"deficiency":{"type":"string","nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"],"nullable":true},"estimatedCost":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","nullable":true},"recommendedAction":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"required":["id","questionId","section","prompt","answerType","position","condition","deficiency","priority","estimatedCost","recommendedAction","value"],"additionalProperties":false}}},"required":["id","buildingId","buildingName","title","schoolYear","assessedOn","assessorName","totalEstimatedCost","facilityConditionIndex","conditionRating","deficiencyCount","publishedAt","publicToken","facilityType","address","yearBuilt","squareFeet","replacementValue","deferredMaintenanceCost","effectiveDeferredMaintenanceCost","correctiveActions","notes","conditionCounts","deficiencyLog","answers"],"additionalProperties":false}},"required":["districtName","review"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/public/facility-reviews/{token}/pdf":{"get":{"summary":"Download a published year-end facility review as a PDF","tags":["Facilities"],"parameters":[{"schema":{"type":"string","minLength":20,"maxLength":64},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/surveys":{"get":{"summary":"List surveys with response counts","tags":["Surveys"],"parameters":[{"schema":{"type":"string","enum":["DRAFT","ACTIVE","CLOSED"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["STUDENT","PARENT","STAFF","ALL"]},"in":"query","name":"audience","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a survey (status = DRAFT)","tags":["Surveys"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":10000},"audience":{"type":"string","enum":["STUDENT","PARENT","STAFF","ALL"]},"opensAt":{"type":"string","format":"date-time"},"closesAt":{"type":"string","format":"date-time"},"schoolYearId":{"type":"string","format":"uuid"},"isAnonymous":{"type":"boolean","default":false},"allowMultipleResponses":{"type":"boolean","default":false},"createdByPersonId":{"type":"string","format":"uuid"}},"required":["title","audience"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}":{"get":{"summary":"Get a survey with its questions","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a survey (active surveys: only dates may change)","tags":["Surveys"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":10000},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","format":"uuid","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a DRAFT survey (hard delete — only if 0 responses)","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/publish":{"post":{"summary":"Publish a survey (must have ≥1 question)","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/close":{"post":{"summary":"Close a survey","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/questions":{"post":{"summary":"Add a question to a survey","tags":["Surveys"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionText":{"type":"string","minLength":1,"maxLength":2000},"questionType":{"type":"string","enum":["TEXT","MULTIPLE_CHOICE","RATING_1_5","RATING_1_10","YES_NO","CHECKBOX"]},"orderIndex":{"type":"integer","minimum":0,"default":0},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":50},"isRequired":{"type":"boolean","default":false}},"required":["questionText","questionType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/questions/{qid}":{"patch":{"summary":"Update a survey question","tags":["Surveys"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionText":{"type":"string","minLength":1,"maxLength":2000},"questionType":{"type":"string","enum":["TEXT","MULTIPLE_CHOICE","RATING_1_5","RATING_1_10","YES_NO","CHECKBOX"]},"orderIndex":{"type":"integer","minimum":0},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":50,"nullable":true},"isRequired":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"qid","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a question (only on DRAFT surveys)","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"qid","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"enum":["null"],"nullable":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/respond-eligible":{"get":{"summary":"List active surveys the calling user can respond to","tags":["Surveys"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/respond":{"get":{"summary":"Get survey questions for responding (audience-gated)","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"audience":{"type":"string"},"status":{"type":"string"},"opensAt":{"type":"string","format":"date-time","nullable":true},"closesAt":{"type":"string","format":"date-time","nullable":true},"schoolYearId":{"type":"string","nullable":true},"isAnonymous":{"type":"boolean"},"allowMultipleResponses":{"type":"boolean"},"createdByPersonId":{"type":"string"},"responseCount":{"type":"integer"},"questionCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","districtId","title","description","audience","status","opensAt","closesAt","schoolYearId","isAnonymous","allowMultipleResponses","createdByPersonId","responseCount","questionCount","createdAt","updatedAt","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/responses":{"post":{"summary":"Submit a survey response","tags":["Surveys"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"respondentType":{"type":"string","enum":["STUDENT","PARENT","STAFF"]},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid"},"answerText":{"type":"string","maxLength":10000},"answerNumber":{"type":"integer"},"answerBoolean":{"type":"boolean"},"answerOptions":{"type":"array","items":{"type":"string"}}},"required":["questionId"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["respondentType","answers"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"respondentPersonId":{"type":"string","nullable":true},"respondentType":{"type":"string"},"submittedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","respondentPersonId","respondentType","submittedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"List individual responses (admin only)","tags":["Surveys"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"respondentPersonId":{"type":"string","nullable":true},"respondentType":{"type":"string"},"submittedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","respondentPersonId","respondentType","submittedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/surveys/{id}/results":{"get":{"summary":"Aggregate results by question","tags":["Surveys"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surveyId":{"type":"string","format":"uuid"},"totalResponses":{"type":"integer"},"questionResults":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"orderIndex":{"type":"integer"},"questionText":{"type":"string"},"questionType":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"nullable":true},"isRequired":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","surveyId","orderIndex","questionText","questionType","options","isRequired","createdAt","updatedAt"],"additionalProperties":false},"answeredCount":{"type":"integer"},"result":{"anyOf":[{"type":"object","properties":{"questionType":{"type":"string","enum":["TEXT"]},"sampleAnswers":{"type":"array","items":{"type":"string"}}},"required":["questionType","sampleAnswers"],"additionalProperties":false},{"type":"object","properties":{"questionType":{"anyOf":[{"type":"string","enum":["RATING_1_5"]},{"type":"string","enum":["RATING_1_10"]}]},"average":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"distribution":{"type":"object","additionalProperties":{"type":"number"}}},"required":["questionType","average","min","max","distribution"],"additionalProperties":false},{"type":"object","properties":{"questionType":{"anyOf":[{"type":"string","enum":["MULTIPLE_CHOICE"]},{"type":"string","enum":["CHECKBOX"]}]},"counts":{"type":"object","additionalProperties":{"type":"number"}}},"required":["questionType","counts"],"additionalProperties":false},{"type":"object","properties":{"questionType":{"type":"string","enum":["YES_NO"]},"yesCount":{"type":"integer"},"noCount":{"type":"integer"},"yesPct":{"type":"number"},"noPct":{"type":"number"}},"required":["questionType","yesCount","noCount","yesPct","noPct"],"additionalProperties":false}]}},"required":["question","answeredCount","result"],"additionalProperties":false}}},"required":["surveyId","totalResponses","questionResults"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/context":{"get":{"summary":"ITW: your access, rubric level names and school years","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"role":{"type":"string","enum":["SUPER_ADMIN","DISTRICT_ADMIN","TEAM_MEMBER"]},"supervisor":{"type":"boolean"},"observer":{"type":"boolean"},"roleLabel":{"type":"string"},"scopedSchoolCount":{"type":"integer","nullable":true},"levelNames":{"type":"array","items":{"type":"string"},"minItems":4,"maxItems":4},"aiEnabled":{"type":"boolean"},"isTrial":{"type":"boolean"},"districtName":{"type":"string"},"userId":{"type":"string","nullable":true},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","isCurrent"],"additionalProperties":false}},"currentYearId":{"type":"string","nullable":true}},"required":["role","supervisor","observer","roleLabel","scopedSchoolCount","levelNames","aiEnabled","isTrial","districtName","userId","years","currentYearId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/dashboard":{"get":{"summary":"ITW dashboard figures","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"year","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"teacher","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"grade","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"subject","required":false},{"schema":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"string","enum":[""]}]},"in":"query","name":"from","required":false},{"schema":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"string","enum":[""]}]},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"string"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","isCurrent"],"additionalProperties":false}},"selectedYearId":{"type":"string","nullable":true},"agg":{"type":"object","properties":{"total":{"type":"integer"},"domainAverages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"avg":{"type":"number","nullable":true}},"required":["key","label","avg"],"additionalProperties":false}},"avgOverall":{"type":"number","nullable":true},"avgComposite":{"type":"number","nullable":true},"pctTechObserved":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"levelDist":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"count":{"type":"integer"}},"required":["level","count"],"additionalProperties":false}},"pctLevels34":{"type":"number","nullable":true},"pctStudentCentered":{"type":"number","nullable":true},"quad":{"type":"object","properties":{"both":{"type":"integer"},"teacherOnly":{"type":"integer"},"studentOnly":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"required":["both","teacherOnly","studentOnly","none","unknown"],"additionalProperties":false},"pctCreation":{"type":"number","nullable":true},"pctAssessment":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctCoaching":{"type":"number","nullable":true},"topApps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"aiAnswered":{"type":"integer"},"aiUserAnswered":{"type":"integer"},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true},"principalAnswered":{"type":"integer"},"pctPrincipalSupport":{"type":"number","nullable":true},"trainingAnswered":{"type":"integer"},"pctTraining":{"type":"number","nullable":true},"barrierAnswered":{"type":"integer"},"pctBarrier":{"type":"number","nullable":true}},"required":["total","domainAverages","avgOverall","avgComposite","pctTechObserved","pctStudentUse","avgIntegration","levelDist","pctLevels34","pctStudentCentered","quad","pctCreation","pctAssessment","pctAi","pctCoaching","topApps","aiAnswered","aiUserAnswered","pctAiTeacher","pctAiStudent","principalAnswered","pctPrincipalSupport","trainingAnswered","pctTraining","barrierAnswered","pctBarrier"],"additionalProperties":false},"trend":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"label":{"type":"string"},"walkthroughs":{"type":"integer"},"avgIntegration":{"type":"number","nullable":true},"pctLevels34":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true}},"required":["month","label","walkthroughs","avgIntegration","pctLevels34","pctStudentUse","pctAi","pctAiTeacher","pctAiStudent"],"additionalProperties":false}},"techObservedCount":{"type":"integer"},"creationCount":{"type":"integer"},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"}},"required":["id","name","isActive"],"additionalProperties":false}},"schoolRows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"agg":{"type":"object","properties":{"total":{"type":"integer"},"domainAverages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"avg":{"type":"number","nullable":true}},"required":["key","label","avg"],"additionalProperties":false}},"avgOverall":{"type":"number","nullable":true},"avgComposite":{"type":"number","nullable":true},"pctTechObserved":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"levelDist":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"count":{"type":"integer"}},"required":["level","count"],"additionalProperties":false}},"pctLevels34":{"type":"number","nullable":true},"pctStudentCentered":{"type":"number","nullable":true},"quad":{"type":"object","properties":{"both":{"type":"integer"},"teacherOnly":{"type":"integer"},"studentOnly":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"required":["both","teacherOnly","studentOnly","none","unknown"],"additionalProperties":false},"pctCreation":{"type":"number","nullable":true},"pctAssessment":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctCoaching":{"type":"number","nullable":true},"topApps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"aiAnswered":{"type":"integer"},"aiUserAnswered":{"type":"integer"},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true},"principalAnswered":{"type":"integer"},"pctPrincipalSupport":{"type":"number","nullable":true},"trainingAnswered":{"type":"integer"},"pctTraining":{"type":"number","nullable":true},"barrierAnswered":{"type":"integer"},"pctBarrier":{"type":"number","nullable":true}},"required":["total","domainAverages","avgOverall","avgComposite","pctTechObserved","pctStudentUse","avgIntegration","levelDist","pctLevels34","pctStudentCentered","quad","pctCreation","pctAssessment","pctAi","pctCoaching","topApps","aiAnswered","aiUserAnswered","pctAiTeacher","pctAiStudent","principalAnswered","pctPrincipalSupport","trainingAnswered","pctTraining","barrierAnswered","pctBarrier"],"additionalProperties":false},"openFollowUps":{"type":"integer"}},"required":["id","name","code","gradeLevel","isActive","agg","openFollowUps"],"additionalProperties":false}},"coachRows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"},"walkthroughs":{"type":"integer"},"schools":{"type":"integer"},"classrooms":{"type":"integer"},"teachers":{"type":"integer"},"followUps":{"type":"integer"},"followUpsDone":{"type":"integer"}},"required":["id","name","isActive","walkthroughs","schools","classrooms","teachers","followUps","followUpsDone"],"additionalProperties":false}},"openFollowUps":{"type":"integer"},"grades":{"type":"array","items":{"type":"string"}},"subjects":{"type":"array","items":{"type":"string"}},"teachers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"}},"required":["id","fullName"],"additionalProperties":false}},"gradeBreakdown":{"type":"array","items":{"type":"object","properties":{"grade":{"type":"string"},"label":{"type":"string"},"agg":{"type":"object","properties":{"total":{"type":"integer"},"domainAverages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"avg":{"type":"number","nullable":true}},"required":["key","label","avg"],"additionalProperties":false}},"avgOverall":{"type":"number","nullable":true},"avgComposite":{"type":"number","nullable":true},"pctTechObserved":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"levelDist":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"count":{"type":"integer"}},"required":["level","count"],"additionalProperties":false}},"pctLevels34":{"type":"number","nullable":true},"pctStudentCentered":{"type":"number","nullable":true},"quad":{"type":"object","properties":{"both":{"type":"integer"},"teacherOnly":{"type":"integer"},"studentOnly":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"required":["both","teacherOnly","studentOnly","none","unknown"],"additionalProperties":false},"pctCreation":{"type":"number","nullable":true},"pctAssessment":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctCoaching":{"type":"number","nullable":true},"topApps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"aiAnswered":{"type":"integer"},"aiUserAnswered":{"type":"integer"},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true},"principalAnswered":{"type":"integer"},"pctPrincipalSupport":{"type":"number","nullable":true},"trainingAnswered":{"type":"integer"},"pctTraining":{"type":"number","nullable":true},"barrierAnswered":{"type":"integer"},"pctBarrier":{"type":"number","nullable":true}},"required":["total","domainAverages","avgOverall","avgComposite","pctTechObserved","pctStudentUse","avgIntegration","levelDist","pctLevels34","pctStudentCentered","quad","pctCreation","pctAssessment","pctAi","pctCoaching","topApps","aiAnswered","aiUserAnswered","pctAiTeacher","pctAiStudent","principalAnswered","pctPrincipalSupport","trainingAnswered","pctTraining","barrierAnswered","pctBarrier"],"additionalProperties":false}},"required":["grade","label","agg"],"additionalProperties":false}},"aiPurposes":{"type":"object","properties":{"answered":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}}},"required":["answered","items"],"additionalProperties":false},"trainingApps":{"type":"object","properties":{"answered":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}}},"required":["answered","items"],"additionalProperties":false},"barriers":{"type":"object","properties":{"answered":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}}},"required":["answered","items"],"additionalProperties":false},"scopedSchoolCount":{"type":"integer","nullable":true}},"required":["period","years","selectedYearId","agg","trend","techObservedCount","creationCount","schools","schoolRows","coachRows","openFollowUps","grades","subjects","teachers","gradeBreakdown","aiPurposes","trainingApps","barriers","scopedSchoolCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs":{"get":{"summary":"List walkthroughs","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"teacher","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"observer","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"grade","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"subject","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"year","required":false},{"schema":{"type":"integer","minimum":1,"maximum":4},"in":"query","name":"integration","required":false},{"schema":{"type":"string","enum":["draft","completed","reopened"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"teacherName":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"schoolName":{"type":"string"},"subject":{"type":"string","nullable":true},"observerName":{"type":"string"},"integrationLevel":{"type":"integer","nullable":true},"overallRating":{"type":"integer","nullable":true},"composite":{"type":"number","nullable":true},"status":{"type":"string","enum":["draft","completed"]},"reopened":{"type":"boolean"},"locked":{"type":"boolean"}},"required":["id","observedOn","teacherName","roomNumber","schoolName","subject","observerName","integrationLevel","overallRating","composite","status","reopened","locked"],"additionalProperties":false}},"total":{"type":"integer"},"page":{"type":"integer"},"totalPages":{"type":"integer"},"reopenedCount":{"type":"integer"},"filters":{"type":"object","properties":{"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"}},"required":["id","name","isActive"],"additionalProperties":false}},"observers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"string"}},"grades":{"type":"array","items":{"type":"string"}},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","isCurrent"],"additionalProperties":false}},"selectedYearId":{"type":"string","nullable":true},"teacherName":{"type":"string","nullable":true}},"required":["schools","observers","subjects","grades","years","selectedYearId","teacherName"],"additionalProperties":false}},"required":["rows","total","page","totalPages","reopenedCount","filters"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a walkthrough (emits ItwWalkthroughStarted)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","minLength":1,"maxLength":64},"teacherPersonId":{"type":"string","maxLength":64,"nullable":true},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"gradeLevel":{"type":"string","maxLength":100,"nullable":true},"subject":{"type":"string","maxLength":100,"nullable":true},"classPeriod":{"type":"string","maxLength":100,"nullable":true},"roomNumber":{"type":"string","maxLength":100,"nullable":true}},"required":["schoolId","observedOn"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/new-options":{"get":{"summary":"Schools and teachers for a new walkthrough","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true}},"required":["id","name","gradeLevel"],"additionalProperties":false}},"teachers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"schoolId":{"type":"string"},"department":{"type":"string","nullable":true}},"required":["id","fullName","schoolId","department"],"additionalProperties":false}},"observerName":{"type":"string"}},"required":["schools","teachers","observerName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}":{"get":{"summary":"A walkthrough with its responses","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"teacherPersonId":{"type":"string","nullable":true},"teacherName":{"type":"string","nullable":true},"observerName":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"classPeriod":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","completed"]},"reopened":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"updatedAt":{"type":"string"},"levels":{"type":"object","properties":{"integration":{"type":"integer","nullable":true},"engagement":{"type":"integer","nullable":true},"proficiency":{"type":"integer","nullable":true},"fluency":{"type":"integer","nullable":true},"overall":{"type":"integer","nullable":true}},"required":["integration","engagement","proficiency","fluency","overall"],"additionalProperties":false},"composite":{"type":"number","nullable":true},"aiObserved":{"type":"boolean"},"coachingNeeded":{"type":"boolean"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"continue":{"type":"boolean"},"reopen":{"type":"boolean"},"lock":{"type":"boolean"},"unlock":{"type":"boolean"},"delete":{"type":"boolean"},"followUp":{"type":"boolean"}},"required":["edit","continue","reopen","lock","unlock","delete","followUp"],"additionalProperties":false},"refusal":{"type":"string","enum":["locked","out_of_scope","forbidden"],"nullable":true},"team":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"type":{"type":"string","enum":["scale","single","multi","text"]},"level":{"type":"integer","nullable":true},"levelText":{"type":"string","nullable":true},"selected":{"type":"array","items":{"type":"string"}},"other":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"commentLabel":{"type":"string"}},"required":["id","prompt","type","level","levelText","selected","other","text","comment","commentLabel"],"additionalProperties":false}}},"required":["id","title","questions"],"additionalProperties":false}},"followUps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"focusArea":{"type":"string"},"status":{"type":"string","enum":["recommended","scheduled","completed"]}},"required":["id","focusArea","status"],"additionalProperties":false}},"serverAnswers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"value":{"type":"object","properties":{"scale":{"type":"integer"},"optionIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"other":{"type":"string"},"text":{"type":"string"}},"additionalProperties":false},"comment":{"type":"string","nullable":true}},"required":["questionId","value","comment"],"additionalProperties":false}}},"required":["id","observedOn","schoolId","schoolName","teacherPersonId","teacherName","observerName","gradeLevel","subject","classPeriod","roomNumber","status","reopened","lockedAt","lockedByName","updatedAt","levels","composite","aiObserved","coachingNeeded","can","refusal","team","sections","followUps","serverAnswers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a walkthrough (emits ItwWalkthroughDeleted)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/form":{"get":{"summary":"The observation form for a draft walkthrough","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"blocked":{"type":"string","enum":["locked","out_of_scope","forbidden","already_completed"],"nullable":true},"teacherName":{"type":"string","nullable":true},"schoolName":{"type":"string"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"subject":{"type":"string","nullable":true},"roomNumber":{"type":"string","nullable":true},"classPeriod":{"type":"string","nullable":true},"reopened":{"type":"boolean"},"lastSavedAt":{"type":"string"},"team":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"type":{"type":"string","enum":["scale","single","multi","text"]},"required":{"type":"boolean"},"allowComment":{"type":"boolean"},"commentLabel":{"type":"string","nullable":true},"allowOther":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"integer","nullable":true}},"required":["id","label","value"],"additionalProperties":false}}},"required":["id","prompt","helpText","type","required","allowComment","commentLabel","allowOther","options"],"additionalProperties":false}}},"required":["id","title","description","questions"],"additionalProperties":false}},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"value":{"type":"object","properties":{"scale":{"type":"integer"},"optionIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"other":{"type":"string"},"text":{"type":"string"}},"additionalProperties":false},"comment":{"type":"string","nullable":true}},"required":["questionId","value","comment"],"additionalProperties":false}}},"required":["id","blocked","teacherName","schoolName","observedOn","subject","roomNumber","classPeriod","reopened","lastSavedAt","team","sections","answers"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/answers":{"put":{"summary":"Save answers; with submit=true, complete the walkthrough (emits ItwWalkthroughDraftSaved / ItwWalkthroughCompleted)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"submit":{"type":"boolean","default":false},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","maxLength":64},"value":{"type":"object","properties":{"scale":{"type":"integer"},"optionIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"other":{"type":"string"},"text":{"type":"string"}},"additionalProperties":false},"comment":{"type":"string","nullable":true}},"required":["questionId","value"],"additionalProperties":false},"maxItems":500}},"required":["answers"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"completed":{"type":"boolean"},"reason":{"type":"string","enum":["missing","not_found","forbidden","out_of_scope","locked","not_draft","too_long"]},"error":{"type":"string"},"missing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"}},"required":["id","prompt"],"additionalProperties":false}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/reopen":{"post":{"summary":"Reopen a walkthrough (emits ItwWalkthroughStatusChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/lock":{"post":{"summary":"Lock a walkthrough (emits ItwWalkthroughStatusChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/unlock":{"post":{"summary":"Unlock a walkthrough (emits ItwWalkthroughStatusChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/walkthroughs/{id}/followups":{"post":{"summary":"Create a follow-up visit from a walkthrough (emits ItwFollowUpCreated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"focusArea":{"type":"string","minLength":1,"maxLength":300},"notes":{"type":"string","maxLength":4000,"nullable":true},"assignedToUserId":{"type":"string","maxLength":64,"nullable":true},"dueOn":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}],"nullable":true},{"type":"string","enum":[""]}]}},"required":["focusArea"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/followups":{"get":{"summary":"The coaching follow-up queue","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","enum":["recommended","scheduled","completed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","enum":["1","true"]},"in":"query","name":"mine","required":false},{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teacherName":{"type":"string"},"teacherPersonId":{"type":"string"},"schoolName":{"type":"string"},"focusArea":{"type":"string"},"notes":{"type":"string","nullable":true},"walkthroughId":{"type":"string","nullable":true},"assignedToName":{"type":"string","nullable":true},"assignedToMe":{"type":"boolean"},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"overdue":{"type":"boolean"},"createdAt":{"type":"string"},"status":{"type":"string","enum":["recommended","scheduled","completed"]},"createdByAi":{"type":"boolean"},"completedAt":{"type":"string","nullable":true},"completedByName":{"type":"string","nullable":true}},"required":["id","teacherName","teacherPersonId","schoolName","focusArea","notes","walkthroughId","assignedToName","assignedToMe","dueOn","overdue","createdAt","status","createdByAi","completedAt","completedByName"],"additionalProperties":false}},"total":{"type":"integer"},"page":{"type":"integer"},"totalPages":{"type":"integer"},"counts":{"type":"object","properties":{"all":{"type":"integer"},"recommended":{"type":"integer"},"scheduled":{"type":"integer"},"completed":{"type":"integer"},"mineOpen":{"type":"integer"}},"required":["all","recommended","scheduled","completed","mineOpen"],"additionalProperties":false},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["rows","total","page","totalPages","counts","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a follow-up by hand (emits ItwFollowUpCreated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teacherPersonId":{"type":"string","minLength":1,"maxLength":64},"focusArea":{"type":"string","minLength":1,"maxLength":300},"notes":{"type":"string","maxLength":4000,"nullable":true},"assignedToUserId":{"type":"string","maxLength":64,"nullable":true},"dueOn":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}],"nullable":true},{"type":"string","enum":[""]}]}},"required":["teacherPersonId","focusArea"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/followups/options":{"get":{"summary":"Teachers and team for a new follow-up","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"teachers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"schoolName":{"type":"string"}},"required":["id","fullName","schoolName"],"additionalProperties":false}},"team":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["teachers","team"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/followups/{id}/status":{"patch":{"summary":"Change a follow-up’s status (emits ItwFollowUpUpdated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["recommended","scheduled","completed"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/followups/{id}/schedule":{"post":{"summary":"Schedule a follow-up visit (emits ItwFollowUpUpdated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["dueOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/followups/{id}":{"delete":{"summary":"Delete a follow-up (supervisor; emits ItwFollowUpUpdated)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form":{"get":{"summary":"The walkthrough form, for the Form Builder","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"type":{"type":"string","enum":["scale","single","multi","text"]},"metricKey":{"type":"string","nullable":true},"required":{"type":"boolean"},"isActive":{"type":"boolean"},"responseCount":{"type":"integer"}},"required":["id","prompt","type","metricKey","required","isActive","responseCount"],"additionalProperties":false}}},"required":["id","title","description","isActive","questions"],"additionalProperties":false}},"answerTotal":{"type":"integer"},"plan":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"}},"platformOptions":{"type":"array","items":{"type":"string"}}},"required":["questions","platformOptions"],"additionalProperties":false}},"required":["sections","answerTotal","plan"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/sections":{"get":{"summary":"Active form sections","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a form section (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/sections/{id}":{"patch":{"summary":"Rename a section (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/sections/{id}/remove":{"post":{"summary":"Remove a section and its questions (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/sections/{id}/restore":{"post":{"summary":"Restore a removed section (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/sections/{id}/move":{"post":{"summary":"Move a section up or down (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dir":{"type":"string","enum":["up","down"]}},"required":["dir"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/questions/{id}":{"get":{"summary":"One question, for the editor","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"question":{"type":"object","properties":{"id":{"type":"string"},"sectionId":{"type":"string"},"prompt":{"type":"string"},"helpText":{"type":"string","nullable":true},"type":{"type":"string","enum":["scale","single","multi","text"]},"metricKey":{"type":"string","nullable":true},"required":{"type":"boolean"},"allowComment":{"type":"boolean"},"commentLabel":{"type":"string","nullable":true},"allowOther":{"type":"boolean"},"isActive":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"integer","nullable":true},"flags":{"type":"array","items":{"type":"string"}}},"required":["id","label","value","flags"],"additionalProperties":false}},"removedOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"integer","nullable":true},"flags":{"type":"array","items":{"type":"string"}}},"required":["id","label","value","flags"],"additionalProperties":false}}},"required":["id","sectionId","prompt","helpText","type","metricKey","required","allowComment","commentLabel","allowOther","isActive","options","removedOptions"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}}},"required":["question","sections"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save a question (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","minLength":1,"maxLength":64},"prompt":{"type":"string","minLength":1,"maxLength":2000},"helpText":{"type":"string","maxLength":2000,"nullable":true},"type":{"type":"string","enum":["scale","single","multi","text"]},"metricKey":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["tech_integration","tech_support_types","student_engagement","student_activities","teacher_proficiency","platforms","digital_fluency","student_skills","strengths","growth","followup_supports","overall_rating","ai_purpose","ai_user","principal_support","app_training","infra_barriers"]}],"nullable":true},{"type":"string","enum":[""]}]},"required":{"type":"boolean","default":false},"allowComment":{"type":"boolean","default":false},"commentLabel":{"type":"string","maxLength":120,"nullable":true},"allowOther":{"type":"boolean","default":false},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":2000},"value":{"type":"integer","minimum":1,"maximum":4,"nullable":true},"flags":{"type":"array","items":{"type":"string","enum":["no_tech","teacher_use","student_use","creation","consumption","collaboration","assessment","ai","research","no_support","ai_teacher","ai_student","principal_support","training_needed","barrier"]},"maxItems":15,"default":[]}},"required":["label"],"additionalProperties":false},"maxItems":60,"default":[]}},"required":["sectionId","prompt","type"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/questions":{"post":{"summary":"Add a question (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string","minLength":1,"maxLength":64},"prompt":{"type":"string","minLength":1,"maxLength":2000},"helpText":{"type":"string","maxLength":2000,"nullable":true},"type":{"type":"string","enum":["scale","single","multi","text"]},"metricKey":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["tech_integration","tech_support_types","student_engagement","student_activities","teacher_proficiency","platforms","digital_fluency","student_skills","strengths","growth","followup_supports","overall_rating","ai_purpose","ai_user","principal_support","app_training","infra_barriers"]}],"nullable":true},{"type":"string","enum":[""]}]},"required":{"type":"boolean","default":false},"allowComment":{"type":"boolean","default":false},"commentLabel":{"type":"string","maxLength":120,"nullable":true},"allowOther":{"type":"boolean","default":false},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":2000},"value":{"type":"integer","minimum":1,"maximum":4,"nullable":true},"flags":{"type":"array","items":{"type":"string","enum":["no_tech","teacher_use","student_use","creation","consumption","collaboration","assessment","ai","research","no_support","ai_teacher","ai_student","principal_support","training_needed","barrier"]},"maxItems":15,"default":[]}},"required":["label"],"additionalProperties":false},"maxItems":60,"default":[]}},"required":["sectionId","prompt","type"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/questions/{id}/remove":{"post":{"summary":"Remove a question (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/questions/{id}/restore":{"post":{"summary":"Restore a question (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/questions/{id}/move":{"post":{"summary":"Move a question (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dir":{"type":"string","enum":["up","down"]}},"required":["dir"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/reset":{"post":{"summary":"Reset the form to the default template (only before any answers; emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/form/add-standard":{"post":{"summary":"Add missing standard questions (emits ItwFormChanged)","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/team":{"get":{"summary":"The walkthrough team","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"roleCodes":{"type":"array","items":{"type":"string"}},"itwRole":{"type":"string","enum":["DISTRICT_ADMIN","TEAM_MEMBER"]},"teamMemberId":{"type":"string"},"title":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"schoolIds":{"type":"array","items":{"type":"string"}},"lastLoginAt":{"type":"string","nullable":true},"walkthroughs":{"type":"integer"},"followUps":{"type":"integer"}},"required":["userId","name","email","status","roleCodes","itwRole","teamMemberId","title","isActive","schoolIds","lastLoginAt","walkthroughs","followUps"],"additionalProperties":false}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["members","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add or update a team member (emits ItwTeamChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"itwRole":{"type":"string","enum":["DISTRICT_ADMIN","TEAM_MEMBER"]},"title":{"type":"string","maxLength":120,"nullable":true}},"required":["userId","itwRole"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/team/candidates":{"get":{"summary":"Find DEP users to add to the team","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"roleCodes":{"type":"array","items":{"type":"string"}},"jobTitle":{"type":"string","nullable":true}},"required":["userId","name","email","roleCodes","jobTitle"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/team/{id}/active":{"patch":{"summary":"Activate or deactivate a team member (emits ItwTeamChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/team/{id}/schools":{"put":{"summary":"Set the schools an observer covers (emits ItwTeamChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":500}},"required":["schoolIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/team/import":{"post":{"summary":"Import team members from CSV (emits ItwTeamChanged)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":1000000}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"added":{"type":"integer"},"problems":{"type":"array","items":{"type":"string"}}},"required":["added","problems"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/settings":{"get":{"summary":"ITW settings","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"levelNames":{"type":"array","items":{"type":"string"},"minItems":4,"maxItems":4},"isDefaultNames":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}}},"required":["levelNames","isDefaultNames","aiEnabled","years"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/settings/level-names":{"put":{"summary":"Rename rubric levels 1–4 (emits ItwSettingsUpdated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","maxLength":80},"minItems":4,"maxItems":4}},"required":["names"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"levelNames":{"type":"array","items":{"type":"string"},"minItems":4,"maxItems":4},"isDefaultNames":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}}},"required":["levelNames","isDefaultNames","aiEnabled","years"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/settings/ai":{"put":{"summary":"Turn the ITW assistant on or off (emits ItwSettingsUpdated)","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"aiEnabled":{"type":"boolean"}},"required":["aiEnabled"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"levelNames":{"type":"array","items":{"type":"string"},"minItems":4,"maxItems":4},"isDefaultNames":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}}},"required":["levelNames","isDefaultNames","aiEnabled","years"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/reports":{"get":{"summary":"Reports index: school reports and saved AI reports","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"yearName":{"type":"string","nullable":true},"yearId":{"type":"string","nullable":true},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"completed":{"type":"integer"}},"required":["id","name","gradeLevel","completed"],"additionalProperties":false}},"aiReports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"scope":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdByName":{"type":"string","nullable":true}},"required":["id","title","scope","createdAt","createdByName"],"additionalProperties":false}},"aiEnabled":{"type":"boolean"}},"required":["yearName","yearId","schools","aiReports","aiEnabled"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/reports/school/{id}":{"get":{"summary":"A printable school report","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"year","required":false},{"schema":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"string","enum":[""]}]},"in":"query","name":"from","required":false},{"schema":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},{"type":"string","enum":[""]}]},"in":"query","name":"to","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"school":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true}},"required":["id","name","gradeLevel"],"additionalProperties":false},"districtName":{"type":"string"},"period":{"type":"string"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","isCurrent"],"additionalProperties":false}},"selectedYear":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["id","name","startDate","endDate"],"additionalProperties":false,"nullable":true},"agg":{"type":"object","properties":{"total":{"type":"integer"},"domainAverages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"avg":{"type":"number","nullable":true}},"required":["key","label","avg"],"additionalProperties":false}},"avgOverall":{"type":"number","nullable":true},"avgComposite":{"type":"number","nullable":true},"pctTechObserved":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"levelDist":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"count":{"type":"integer"}},"required":["level","count"],"additionalProperties":false}},"pctLevels34":{"type":"number","nullable":true},"pctStudentCentered":{"type":"number","nullable":true},"quad":{"type":"object","properties":{"both":{"type":"integer"},"teacherOnly":{"type":"integer"},"studentOnly":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"required":["both","teacherOnly","studentOnly","none","unknown"],"additionalProperties":false},"pctCreation":{"type":"number","nullable":true},"pctAssessment":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctCoaching":{"type":"number","nullable":true},"topApps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"aiAnswered":{"type":"integer"},"aiUserAnswered":{"type":"integer"},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true},"principalAnswered":{"type":"integer"},"pctPrincipalSupport":{"type":"number","nullable":true},"trainingAnswered":{"type":"integer"},"pctTraining":{"type":"number","nullable":true},"barrierAnswered":{"type":"integer"},"pctBarrier":{"type":"number","nullable":true}},"required":["total","domainAverages","avgOverall","avgComposite","pctTechObserved","pctStudentUse","avgIntegration","levelDist","pctLevels34","pctStudentCentered","quad","pctCreation","pctAssessment","pctAi","pctCoaching","topApps","aiAnswered","aiUserAnswered","pctAiTeacher","pctAiStudent","principalAnswered","pctPrincipalSupport","trainingAnswered","pctTraining","barrierAnswered","pctBarrier"],"additionalProperties":false},"teachers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"visits":{"type":"integer"},"agg":{"type":"object","properties":{"total":{"type":"integer"},"domainAverages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"avg":{"type":"number","nullable":true}},"required":["key","label","avg"],"additionalProperties":false}},"avgOverall":{"type":"number","nullable":true},"avgComposite":{"type":"number","nullable":true},"pctTechObserved":{"type":"number","nullable":true},"pctStudentUse":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"levelDist":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"count":{"type":"integer"}},"required":["level","count"],"additionalProperties":false}},"pctLevels34":{"type":"number","nullable":true},"pctStudentCentered":{"type":"number","nullable":true},"quad":{"type":"object","properties":{"both":{"type":"integer"},"teacherOnly":{"type":"integer"},"studentOnly":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"required":["both","teacherOnly","studentOnly","none","unknown"],"additionalProperties":false},"pctCreation":{"type":"number","nullable":true},"pctAssessment":{"type":"number","nullable":true},"pctAi":{"type":"number","nullable":true},"pctCoaching":{"type":"number","nullable":true},"topApps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"aiAnswered":{"type":"integer"},"aiUserAnswered":{"type":"integer"},"pctAiTeacher":{"type":"number","nullable":true},"pctAiStudent":{"type":"number","nullable":true},"principalAnswered":{"type":"integer"},"pctPrincipalSupport":{"type":"number","nullable":true},"trainingAnswered":{"type":"integer"},"pctTraining":{"type":"number","nullable":true},"barrierAnswered":{"type":"integer"},"pctBarrier":{"type":"number","nullable":true}},"required":["total","domainAverages","avgOverall","avgComposite","pctTechObserved","pctStudentUse","avgIntegration","levelDist","pctLevels34","pctStudentCentered","quad","pctCreation","pctAssessment","pctAi","pctCoaching","topApps","aiAnswered","aiUserAnswered","pctAiTeacher","pctAiStudent","principalAnswered","pctPrincipalSupport","trainingAnswered","pctTraining","barrierAnswered","pctBarrier"],"additionalProperties":false},"lastVisit":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["id","name","visits","agg","lastVisit"],"additionalProperties":false}},"followUps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teacherName":{"type":"string"},"focusArea":{"type":"string"},"status":{"type":"string","enum":["recommended","scheduled","completed"]}},"required":["id","teacherName","focusArea","status"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"teacherName":{"type":"string","nullable":true},"observerName":{"type":"string"},"integrationLevel":{"type":"integer","nullable":true}},"required":["id","observedOn","teacherName","observerName","integrationLevel"],"additionalProperties":false}}},"required":["school","districtName","period","years","selectedYear","agg","teachers","followUps","recent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/reports/ai/{id}":{"get":{"summary":"A saved AI report","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"scope":{"type":"string","nullable":true},"markdown":{"type":"string"},"createdAt":{"type":"string"},"createdByName":{"type":"string","nullable":true},"districtName":{"type":"string"}},"required":["id","title","scope","markdown","createdAt","createdByName","districtName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/export/walkthroughs":{"get":{"summary":"Completed walkthroughs as CSV (emits ItwWalkthroughsExported)","tags":["Instructional Technology Walkthroughs"],"description":"text/csv. ?year=<school year id>|all; default the current year.","parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"year","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/itw/rubric":{"get":{"summary":"How scoring works: the live rubric","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"levelNames":{"type":"array","items":{"type":"string"},"minItems":4,"maxItems":4},"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"metricKey":{"type":"string","nullable":true},"levels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"integer"},"label":{"type":"string"}},"required":["id","value","label"],"additionalProperties":false}}},"required":["id","name","prompt","metricKey","levels"],"additionalProperties":false}}},"required":["levelNames","domains"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/schools":{"get":{"summary":"Schools with teacher and walkthrough counts","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"principalName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"teachers":{"type":"integer"},"walkthroughs":{"type":"integer"}},"required":["id","organizationId","name","code","gradeLevel","principalName","isActive","teachers","walkthroughs"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/teachers":{"get":{"summary":"Teachers (DEP staff) with walkthrough counts","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"totalPages":{"type":"integer"},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string","nullable":true},"schoolName":{"type":"string"},"department":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"walkthroughs":{"type":"integer"},"openFollowUps":{"type":"integer"},"lastObserved":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"followUps":{"type":"integer"},"grade":{"type":"string","nullable":true}},"required":["id","fullName","email","schoolName","department","isActive","walkthroughs","openFollowUps","lastObserved","followUps","grade"],"additionalProperties":false}}},"required":["total","page","totalPages","schools","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/teachers/{personId}/walkthroughs":{"get":{"summary":"One teacher’s walkthroughs and follow-ups","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object","properties":{"completed":{"type":"integer"},"avgComposite":{"type":"number","nullable":true},"avgIntegration":{"type":"number","nullable":true},"openFollowUps":{"type":"integer"},"lastObserved":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["completed","avgComposite","avgIntegration","openFollowUps","lastObserved"],"additionalProperties":false},"walkthroughs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"schoolName":{"type":"string"},"subject":{"type":"string","nullable":true},"observerName":{"type":"string"},"status":{"type":"string","enum":["draft","completed"]},"integrationLevel":{"type":"integer","nullable":true},"composite":{"type":"number","nullable":true}},"required":["id","observedOn","schoolName","subject","observerName","status","integrationLevel","composite"],"additionalProperties":false}},"followUps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"focusArea":{"type":"string"},"status":{"type":"string","enum":["recommended","scheduled","completed"]},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["id","focusArea","status","dueOn"],"additionalProperties":false}}},"required":["summary","walkthroughs","followUps"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/assistant/messages":{"post":{"summary":"Ask the ITW assistant; returns at once, poll the message","tags":["Instructional Technology Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":8000},"conversationId":{"type":"string","maxLength":64,"nullable":true},"page":{"type":"string","maxLength":300,"nullable":true}},"required":["message"],"additionalProperties":false}}},"required":true},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"conversationId":{"type":"string"},"messageId":{"type":"string"}},"required":["conversationId","messageId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/assistant/messages/{id}":{"get":{"summary":"An assistant answer, as far as it has got","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","done","error"]},"content":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"cards":{"type":"array","items":{"type":"object","additionalProperties":{}}},"error":{"type":"string","nullable":true}},"required":["id","status","content","steps","cards","error"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/assistant/conversation":{"get":{"summary":"Your most recent assistant conversation (last 12 hours)","tags":["Instructional Technology Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","done","error"]},"content":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"cards":{"type":"array","items":{"type":"object","additionalProperties":{}}},"error":{"type":"string","nullable":true},"role":{"type":"string","enum":["user","assistant"]}},"required":["id","status","content","steps","cards","error","role"],"additionalProperties":false}}},"required":["id","messages"],"additionalProperties":false,"nullable":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/assistant/conversations/{id}":{"delete":{"summary":"Clear an assistant conversation (emits ItwAiActivity)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/itw/assistant/email-drafts/{id}/send":{"post":{"summary":"Send an email the assistant drafted (emits ItwAiActivity)","tags":["Instructional Technology Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"required":["to","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/context":{"get":{"summary":"IRW: your IRW role, flags and menu, school years and the current round","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"role":{"type":"string","enum":["PLATFORM_ADMIN","TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"roleLabel":{"type":"string"},"memberRole":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"],"nullable":true},"title":{"type":"string","nullable":true},"canReadAll":{"type":"boolean"},"isTester":{"type":"boolean"},"canViewRunbook":{"type":"boolean"},"canViewFeedback":{"type":"boolean"},"isPlatform":{"type":"boolean"},"userId":{"type":"string","nullable":true},"menu":{"type":"object","properties":{"dashboard":{"type":"boolean"},"visits":{"type":"boolean"},"calendar":{"type":"boolean"},"schools":{"type":"boolean"},"templates":{"type":"boolean"},"compare":{"type":"boolean"},"team":{"type":"boolean"},"teams":{"type":"boolean"},"activity":{"type":"boolean"},"usage":{"type":"boolean"},"reportBuilder":{"type":"boolean"},"settings":{"type":"boolean"},"reports":{"type":"boolean"},"schoolSummary":{"type":"boolean"},"auditStatus":{"type":"boolean"},"runbook":{"type":"boolean"},"feedback":{"type":"boolean"}},"required":["dashboard","visits","calendar","schools","templates","compare","team","teams","activity","usage","reportBuilder","settings","reports","schoolSummary","auditStatus","runbook","feedback"],"additionalProperties":false},"districtName":{"type":"string"},"isTrial":{"type":"boolean"},"currentRound":{"type":"integer"},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"currentYearId":{"type":"string","nullable":true}},"required":["role","roleLabel","memberRole","title","canReadAll","isTester","canViewRunbook","canViewFeedback","isPlatform","userId","menu","districtName","isTrial","currentRound","years","currentYearId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/menu":{"get":{"summary":"IRW: the sidebar items your IRW role shows (null when you are not a member)","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menu":{"type":"object","properties":{"dashboard":{"type":"boolean"},"visits":{"type":"boolean"},"calendar":{"type":"boolean"},"schools":{"type":"boolean"},"templates":{"type":"boolean"},"compare":{"type":"boolean"},"team":{"type":"boolean"},"teams":{"type":"boolean"},"activity":{"type":"boolean"},"usage":{"type":"boolean"},"reportBuilder":{"type":"boolean"},"settings":{"type":"boolean"},"reports":{"type":"boolean"},"schoolSummary":{"type":"boolean"},"auditStatus":{"type":"boolean"},"runbook":{"type":"boolean"},"feedback":{"type":"boolean"}},"required":["dashboard","visits","calendar","schools","templates","compare","team","teams","activity","usage","reportBuilder","settings","reports","schoolSummary","auditStatus","runbook","feedback"],"additionalProperties":false,"nullable":true}},"required":["menu"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/irw/members":{"get":{"summary":"IRW members and their roles","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"roleCodes":{"type":"array","items":{"type":"string"}},"irwRole":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"title":{"type":"string","nullable":true},"canReadAll":{"type":"boolean"},"isTester":{"type":"boolean"},"canViewRunbook":{"type":"boolean"},"canViewFeedback":{"type":"boolean"},"isActive":{"type":"boolean"},"lastLoginAt":{"type":"string","nullable":true},"teams":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"isLead":{"type":"boolean"}},"required":["name","isLead"],"additionalProperties":false}}},"required":["memberId","userId","name","email","status","roleCodes","irwRole","title","canReadAll","isTester","canViewRunbook","canViewFeedback","isActive","lastLoginAt","teams"],"additionalProperties":false}},"can":{"type":"object","properties":{"techRoles":{"type":"boolean"},"canReadAll":{"type":"boolean"},"isTester":{"type":"boolean"},"canViewRunbook":{"type":"boolean"},"canViewFeedback":{"type":"boolean"}},"required":["techRoles","canReadAll","isTester","canViewRunbook","canViewFeedback"],"additionalProperties":false}},"required":["members","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add or update an IRW member (emits IrwMemberChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"irwRole":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"title":{"type":"string","maxLength":120,"nullable":true},"canReadAll":{"type":"boolean"},"isTester":{"type":"boolean"},"canViewRunbook":{"type":"boolean"},"canViewFeedback":{"type":"boolean"}},"required":["userId","irwRole"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/members/candidates":{"get":{"summary":"Find DEP users to add to IRW","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"roleCodes":{"type":"array","items":{"type":"string"}},"jobTitle":{"type":"string","nullable":true}},"required":["userId","name","email","roleCodes","jobTitle"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/members/{id}/active":{"patch":{"summary":"Activate or deactivate an IRW member (emits IrwMemberChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/members/import":{"post":{"summary":"Import IRW members from CSV (emits IrwMemberChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":1000000}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"added":{"type":"integer"},"problems":{"type":"array","items":{"type":"string"}}},"required":["added","problems"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/settings":{"get":{"summary":"IRW settings","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"letterhead":{"type":"object","properties":{"reportHeader":{"type":"string","maxLength":2000,"nullable":true},"reportSubhead":{"type":"string","maxLength":2000,"nullable":true},"superintendentName":{"type":"string","maxLength":200,"nullable":true},"superintendentTitle":{"type":"string","maxLength":200,"nullable":true},"boardMembers":{"type":"string","maxLength":5000,"nullable":true},"letterheadPhone":{"type":"string","maxLength":40,"nullable":true},"letterheadEmail":{"type":"string","maxLength":200,"nullable":true}},"required":["reportHeader","reportSubhead","superintendentName","superintendentTitle","boardMembers","letterheadPhone","letterheadEmail"],"additionalProperties":false},"district":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"isTrial":{"type":"boolean"}},"required":["name","logoUrl","address","isTrial"],"additionalProperties":false},"currentRound":{"type":"integer"},"metThreshold":{"type":"number"},"partialThreshold":{"type":"number"},"digestHour":{"type":"integer"},"sandboxSchoolIds":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"teacherRoster":{"type":"object","properties":{"teachers":{"type":"integer"},"schools":{"type":"integer"}},"required":["teachers","schools"],"additionalProperties":false},"updatedAt":{"type":"string"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"sandbox":{"type":"boolean"},"newYear":{"type":"boolean"},"alerts":{"type":"boolean"}},"required":["edit","sandbox","newYear","alerts"],"additionalProperties":false}},"required":["letterhead","district","currentRound","metThreshold","partialThreshold","digestHour","sandboxSchoolIds","schools","teacherRoster","updatedAt","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/settings/letterhead":{"put":{"summary":"Save the report letterhead (emits IrwSettingsUpdated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportHeader":{"type":"string","maxLength":2000,"nullable":true},"reportSubhead":{"type":"string","maxLength":2000,"nullable":true},"superintendentName":{"type":"string","maxLength":200,"nullable":true},"superintendentTitle":{"type":"string","maxLength":200,"nullable":true},"boardMembers":{"type":"string","maxLength":5000,"nullable":true},"letterheadPhone":{"type":"string","maxLength":40,"nullable":true},"letterheadEmail":{"anyOf":[{"type":"string","format":"email","maxLength":200},{"type":"string","enum":[""]},{"enum":["null"],"nullable":true}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"letterhead":{"type":"object","properties":{"reportHeader":{"type":"string","maxLength":2000,"nullable":true},"reportSubhead":{"type":"string","maxLength":2000,"nullable":true},"superintendentName":{"type":"string","maxLength":200,"nullable":true},"superintendentTitle":{"type":"string","maxLength":200,"nullable":true},"boardMembers":{"type":"string","maxLength":5000,"nullable":true},"letterheadPhone":{"type":"string","maxLength":40,"nullable":true},"letterheadEmail":{"type":"string","maxLength":200,"nullable":true}},"required":["reportHeader","reportSubhead","superintendentName","superintendentTitle","boardMembers","letterheadPhone","letterheadEmail"],"additionalProperties":false},"district":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"isTrial":{"type":"boolean"}},"required":["name","logoUrl","address","isTrial"],"additionalProperties":false},"currentRound":{"type":"integer"},"metThreshold":{"type":"number"},"partialThreshold":{"type":"number"},"digestHour":{"type":"integer"},"sandboxSchoolIds":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"teacherRoster":{"type":"object","properties":{"teachers":{"type":"integer"},"schools":{"type":"integer"}},"required":["teachers","schools"],"additionalProperties":false},"updatedAt":{"type":"string"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"sandbox":{"type":"boolean"},"newYear":{"type":"boolean"},"alerts":{"type":"boolean"}},"required":["edit","sandbox","newYear","alerts"],"additionalProperties":false}},"required":["letterhead","district","currentRound","metThreshold","partialThreshold","digestHour","sandboxSchoolIds","schools","teacherRoster","updatedAt","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/settings/rounds":{"put":{"summary":"Set the current round and rating bands (emits IrwSettingsUpdated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"currentRound":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"metThreshold":{"type":"number","minimum":1,"maximum":100},"partialThreshold":{"type":"number","minimum":0,"maximum":99}},"required":["currentRound","metThreshold","partialThreshold"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"letterhead":{"type":"object","properties":{"reportHeader":{"type":"string","maxLength":2000,"nullable":true},"reportSubhead":{"type":"string","maxLength":2000,"nullable":true},"superintendentName":{"type":"string","maxLength":200,"nullable":true},"superintendentTitle":{"type":"string","maxLength":200,"nullable":true},"boardMembers":{"type":"string","maxLength":5000,"nullable":true},"letterheadPhone":{"type":"string","maxLength":40,"nullable":true},"letterheadEmail":{"type":"string","maxLength":200,"nullable":true}},"required":["reportHeader","reportSubhead","superintendentName","superintendentTitle","boardMembers","letterheadPhone","letterheadEmail"],"additionalProperties":false},"district":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"isTrial":{"type":"boolean"}},"required":["name","logoUrl","address","isTrial"],"additionalProperties":false},"currentRound":{"type":"integer"},"metThreshold":{"type":"number"},"partialThreshold":{"type":"number"},"digestHour":{"type":"integer"},"sandboxSchoolIds":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"teacherRoster":{"type":"object","properties":{"teachers":{"type":"integer"},"schools":{"type":"integer"}},"required":["teachers","schools"],"additionalProperties":false},"updatedAt":{"type":"string"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"sandbox":{"type":"boolean"},"newYear":{"type":"boolean"},"alerts":{"type":"boolean"}},"required":["edit","sandbox","newYear","alerts"],"additionalProperties":false}},"required":["letterhead","district","currentRound","metThreshold","partialThreshold","digestHour","sandboxSchoolIds","schools","teacherRoster","updatedAt","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/settings/sandbox":{"put":{"summary":"Mark sandbox schools for testers (emits IrwSettingsUpdated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":500}},"required":["schoolIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"letterhead":{"type":"object","properties":{"reportHeader":{"type":"string","maxLength":2000,"nullable":true},"reportSubhead":{"type":"string","maxLength":2000,"nullable":true},"superintendentName":{"type":"string","maxLength":200,"nullable":true},"superintendentTitle":{"type":"string","maxLength":200,"nullable":true},"boardMembers":{"type":"string","maxLength":5000,"nullable":true},"letterheadPhone":{"type":"string","maxLength":40,"nullable":true},"letterheadEmail":{"type":"string","maxLength":200,"nullable":true}},"required":["reportHeader","reportSubhead","superintendentName","superintendentTitle","boardMembers","letterheadPhone","letterheadEmail"],"additionalProperties":false},"district":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"isTrial":{"type":"boolean"}},"required":["name","logoUrl","address","isTrial"],"additionalProperties":false},"currentRound":{"type":"integer"},"metThreshold":{"type":"number"},"partialThreshold":{"type":"number"},"digestHour":{"type":"integer"},"sandboxSchoolIds":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"teacherRoster":{"type":"object","properties":{"teachers":{"type":"integer"},"schools":{"type":"integer"}},"required":["teachers","schools"],"additionalProperties":false},"updatedAt":{"type":"string"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"sandbox":{"type":"boolean"},"newYear":{"type":"boolean"},"alerts":{"type":"boolean"}},"required":["edit","sandbox","newYear","alerts"],"additionalProperties":false}},"required":["letterhead","district","currentRound","metThreshold","partialThreshold","digestHour","sandboxSchoolIds","schools","teacherRoster","updatedAt","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/new-year":{"get":{"summary":"New-year wizard: readiness, years, templates, schools","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"currentYear":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false,"nullable":true},"readiness":{"type":"object","properties":{"totalVisits":{"type":"integer"},"openVisits":{"type":"integer"},"openRounds":{"type":"array","items":{"type":"integer"}}},"required":["totalVisits","openVisits","openRounds"],"additionalProperties":false},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"teamCount":{"type":"integer"},"memberCount":{"type":"integer"}},"required":["id","name","yearName","isCurrentYear","teamCount","memberCount"],"additionalProperties":false}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isSandbox":{"type":"boolean"}},"required":["id","name","isSandbox"],"additionalProperties":false}}},"required":["currentYear","readiness","years","templates","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a new walkthrough year (emits IrwTemplateCloned, IrwNewYearStarted, IrwVisitScheduled)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"sourceTemplateId":{"type":"string","minLength":1,"maxLength":64},"templateName":{"type":"string","maxLength":200,"nullable":true},"scheduleVisits":{"type":"boolean","default":true},"visitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":500,"default":[]}},"required":["schoolYearId","sourceTemplateId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"year":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"visitIds":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"type":"string"}}},"required":["year","template","visitIds","failed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/templates":{"get":{"summary":"Walkthrough templates","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"yearId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"isActive":{"type":"boolean"},"isLocked":{"type":"boolean"},"structureLocked":{"type":"boolean"},"teamCount":{"type":"integer"},"indicatorCount":{"type":"integer"},"visitCount":{"type":"integer"},"memberCount":{"type":"integer"},"clonedFromName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","name","description","schoolYearId","yearName","isCurrentYear","isActive","isLocked","structureLocked","teamCount","indicatorCount","visitCount","memberCount","clonedFromName","createdAt"],"additionalProperties":false}},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["templates","years","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a template (emits IrwTemplateCreated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"scoringScope":{"type":"string","enum":["building","per_room","per_teacher"],"default":"building"},"isActive":{"type":"boolean","default":true},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"scoringScopeOverride":{"type":"string","enum":["building","per_room","per_teacher"],"nullable":true},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000,"nullable":true},"indicatorType":{"type":"string","enum":["yes_no","yes_no_na","percentage","numeric","text"],"default":"yes_no_na"},"isRequired":{"type":"boolean","default":true},"allowNA":{"type":"boolean","default":false},"weight":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":1000,"default":1},"isActive":{"type":"boolean","default":true}},"required":["label"],"additionalProperties":false},"maxItems":500,"default":[]}},"required":["name"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["name"],"additionalProperties":false},"maxItems":60,"default":[]}},"required":["name","schoolYearId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/templates/{id}":{"get":{"summary":"One template with its teams, sections and indicators","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"isActive":{"type":"boolean"},"isLocked":{"type":"boolean"},"structureLocked":{"type":"boolean"},"teamCount":{"type":"integer"},"indicatorCount":{"type":"integer"},"visitCount":{"type":"integer"},"memberCount":{"type":"integer"},"clonedFromName":{"type":"string","nullable":true},"createdAt":{"type":"string"},"lockReason":{"type":"string","nullable":true}},"required":["id","name","description","schoolYearId","yearName","isCurrentYear","isActive","isLocked","structureLocked","teamCount","indicatorCount","visitCount","memberCount","clonedFromName","createdAt","lockReason"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"scoringScope":{"type":"string","enum":["building","per_room","per_teacher"]},"isActive":{"type":"boolean"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"scoringScopeOverride":{"type":"string","enum":["building","per_room","per_teacher"],"nullable":true},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string","nullable":true},"indicatorType":{"type":"string","enum":["yes_no","yes_no_na","percentage","numeric","text"]},"sortOrder":{"type":"integer"},"isRequired":{"type":"boolean"},"allowNA":{"type":"boolean"},"weight":{"type":"number"},"isActive":{"type":"boolean"}},"required":["id","label","description","indicatorType","sortOrder","isRequired","allowNA","weight","isActive"],"additionalProperties":false}}},"required":["id","name","description","sortOrder","scoringScopeOverride","indicators"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"}},"required":["userId","name","isLead"],"additionalProperties":false}}},"required":["id","name","description","sortOrder","scoringScope","isActive","sections","members"],"additionalProperties":false}},"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["template","teams","years","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save a template (409 when locked; emits IrwTemplateUpdated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"isActive":{"type":"boolean"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"scoringScope":{"type":"string","enum":["building","per_room","per_teacher"],"default":"building"},"isActive":{"type":"boolean","default":true},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"scoringScopeOverride":{"type":"string","enum":["building","per_room","per_teacher"],"nullable":true},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"label":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000,"nullable":true},"indicatorType":{"type":"string","enum":["yes_no","yes_no_na","percentage","numeric","text"],"default":"yes_no_na"},"isRequired":{"type":"boolean","default":true},"allowNA":{"type":"boolean","default":false},"weight":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":1000,"default":1},"isActive":{"type":"boolean","default":true}},"required":["label"],"additionalProperties":false},"maxItems":500,"default":[]}},"required":["name"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["name"],"additionalProperties":false},"maxItems":60}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a template with no visits (soft; emits IrwTemplateDeleted)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/templates/{id}/clone":{"post":{"summary":"Clone a template into a school year, with rosters (emits IrwTemplateCloned)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"nullable":true},"schoolYearId":{"type":"string","minLength":1,"maxLength":64}},"required":["schoolYearId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/schools/{schoolId}/files":{"get":{"summary":"Files kept for a school (IRW school files)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"schoolId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"kind":{"type":"string","enum":["audio","pdf","document","image","other"]},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadedByName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","schoolId","kind","title","description","filename","mimeType","sizeBytes","uploadedByName","createdAt"],"additionalProperties":false}},"can":{"type":"object","properties":{"upload":{"type":"boolean"},"delete":{"type":"boolean"}},"required":["upload","delete"],"additionalProperties":false},"maxBytes":{"type":"number"}},"required":["schoolId","schoolName","files","can","maxBytes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Upload a school file (multipart \"file\", optional \"title\", \"description\"; emits IrwSchoolFileUploaded)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"schoolId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"kind":{"type":"string","enum":["audio","pdf","document","image","other"]},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadedByName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","schoolId","kind","title","description","filename","mimeType","sizeBytes","uploadedByName","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/school-files/{id}/file":{"get":{"summary":"Open a school file (inline; byte ranges for audio)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/irw/school-files/{id}":{"delete":{"summary":"Delete a school file (emits IrwSchoolFileDeleted)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits":{"get":{"summary":"Walkthrough visits for a year and round","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"yearId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":false},{"schema":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"yearId":{"type":"string","nullable":true},"yearIsCurrent":{"type":"boolean"},"rounds":{"type":"array","items":{"type":"integer"}},"round":{"type":"integer"},"currentRound":{"type":"integer"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"],"nullable":true},"cycle":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true},"reopenedAt":{"type":"string","nullable":true},"reopenedByName":{"type":"string","nullable":true},"canChange":{"type":"boolean"}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName","reopenedAt","reopenedByName","canChange"],"additionalProperties":false,"nullable":true},"visits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"visitDate":{"type":"string"},"visitRound":{"type":"integer"},"yearName":{"type":"string"},"templateName":{"type":"string"},"teamsTotal":{"type":"integer"},"teamsComplete":{"type":"integer"},"avgPct":{"type":"number","nullable":true},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["finished","in_progress","not_started"]}},"required":["id","name","state"],"additionalProperties":false}}},"required":["id","schoolId","schoolName","status","visitDate","visitRound","yearName","templateName","teamsTotal","teamsComplete","avgPct","teams"],"additionalProperties":false}},"can":{"type":"object","properties":{"create":{"type":"boolean"},"start":{"type":"boolean"},"reset":{"type":"boolean"},"lockReview":{"type":"boolean"},"delete":{"type":"boolean"}},"required":["create","start","reset","lockReview","delete"],"additionalProperties":false}},"required":["years","yearId","yearIsCurrent","rounds","round","currentRound","status","cycle","visits","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule one visit (locks the template; emits IrwVisitScheduled)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","minLength":1,"maxLength":64},"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"templateId":{"type":"string","minLength":1,"maxLength":64},"visitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["schoolId","schoolYearId","templateId","visitDate"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/options":{"get":{"summary":"Schools, templates and already-scheduled schools for the new-visit and schedule screens","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"currentYearId":{"type":"string","nullable":true},"currentRound":{"type":"integer"},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"schoolYearId":{"type":"string"},"teamCount":{"type":"integer"},"isLocked":{"type":"boolean"}},"required":["id","name","schoolYearId","teamCount","isLocked"],"additionalProperties":false}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"},"isSandbox":{"type":"boolean"}},"required":["id","name","isActive","isSandbox"],"additionalProperties":false}},"scheduled":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"can":{"type":"object","properties":{"create":{"type":"boolean"}},"required":["create"],"additionalProperties":false}},"required":["years","currentYearId","currentRound","templates","schools","scheduled","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/bulk":{"post":{"summary":"Schedule the same template at many schools (skips schools already visited this round)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":500},"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"templateId":{"type":"string","minLength":1,"maxLength":64},"visitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["schoolIds","schoolYearId","templateId","visitDate"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"},"createdSchools":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"type":"string"}},"visitRound":{"type":"integer"},"visitIds":{"type":"array","items":{"type":"string"}}},"required":["created","createdSchools","skipped","failed","visitRound","visitIds"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}":{"get":{"summary":"One visit: teams, progress, removed teams, review state","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visit":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"yearIsCurrent":{"type":"boolean"},"templateId":{"type":"string"},"templateName":{"type":"string"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"visitDate":{"type":"string"},"visitRound":{"type":"integer"},"notes":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"completedByName":{"type":"string","nullable":true}},"required":["id","schoolId","schoolName","schoolYearId","yearName","yearIsCurrent","templateId","templateName","status","visitDate","visitRound","notes","startedAt","completedAt","completedByName"],"additionalProperties":false},"stats":{"type":"object","properties":{"teamsComplete":{"type":"integer"},"teamsTotal":{"type":"integer"},"avgPct":{"type":"number","nullable":true},"memberCount":{"type":"integer"},"unresolvedFlags":{"type":"integer"},"escalated":{"type":"integer"}},"required":["teamsComplete","teamsTotal","avgPct","memberCount","unresolvedFlags","escalated"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamTemplateId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["building","per_room","per_teacher"]},"sortOrder":{"type":"integer"},"isComplete":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"isRemoved":{"type":"boolean"},"removedAt":{"type":"string","nullable":true},"sectionCount":{"type":"integer"},"indicatorCount":{"type":"integer"},"entityCount":{"type":"integer"},"scored":{"type":"integer"},"possible":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"},"isActiveWalker":{"type":"boolean"},"hasScored":{"type":"boolean"}},"required":["userId","name","isLead","isActiveWalker","hasScored"],"additionalProperties":false}},"can":{"type":"object","properties":{"manageMembers":{"type":"boolean"},"restrictRemoval":{"type":"boolean"},"assignSections":{"type":"boolean"},"reset":{"type":"boolean"},"remove":{"type":"boolean"},"restore":{"type":"boolean"},"open":{"type":"boolean"}},"required":["manageMembers","restrictRemoval","assignSections","reset","remove","restore","open"],"additionalProperties":false}},"required":["id","teamTemplateId","name","description","scope","sortOrder","isComplete","lockedAt","lockedByName","percentageMet","isRemoved","removedAt","sectionCount","indicatorCount","entityCount","scored","possible","members","can"],"additionalProperties":false}},"removedTeams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamTemplateId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["building","per_room","per_teacher"]},"sortOrder":{"type":"integer"},"isComplete":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"isRemoved":{"type":"boolean"},"removedAt":{"type":"string","nullable":true},"sectionCount":{"type":"integer"},"indicatorCount":{"type":"integer"},"entityCount":{"type":"integer"},"scored":{"type":"integer"},"possible":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"},"isActiveWalker":{"type":"boolean"},"hasScored":{"type":"boolean"}},"required":["userId","name","isLead","isActiveWalker","hasScored"],"additionalProperties":false}},"can":{"type":"object","properties":{"manageMembers":{"type":"boolean"},"restrictRemoval":{"type":"boolean"},"assignSections":{"type":"boolean"},"reset":{"type":"boolean"},"remove":{"type":"boolean"},"restore":{"type":"boolean"},"open":{"type":"boolean"}},"required":["manageMembers","restrictRemoval","assignSections","reset","remove","restore","open"],"additionalProperties":false}},"required":["id","teamTemplateId","name","description","scope","sortOrder","isComplete","lockedAt","lockedByName","percentageMet","isRemoved","removedAt","sectionCount","indicatorCount","entityCount","scored","possible","members","can"],"additionalProperties":false}},"cycle":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true},"reopenedAt":{"type":"string","nullable":true},"reopenedByName":{"type":"string","nullable":true},"canChange":{"type":"boolean"}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName","reopenedAt","reopenedByName","canChange"],"additionalProperties":false},"allTeamsComplete":{"type":"boolean"},"openTeams":{"type":"integer"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"start":{"type":"boolean"},"reset":{"type":"boolean"},"delete":{"type":"boolean"},"lockReview":{"type":"boolean"},"reopenReview":{"type":"boolean"},"seesAllTeams":{"type":"boolean"},"remediation":{"type":"boolean"},"schoolFiles":{"type":"boolean"},"uploadSchoolFiles":{"type":"boolean"},"reports":{"type":"boolean"}},"required":["edit","start","reset","delete","lockReview","reopenReview","seesAllTeams","remediation","schoolFiles","uploadSchoolFiles","reports"],"additionalProperties":false}},"required":["visit","stats","teams","removedTeams","cycle","allTeamsComplete","openTeams","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a visit’s date or notes (emits IrwVisitUpdated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a visit (soft; emits IrwVisitDeleted)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/status":{"patch":{"summary":"Start a visit (completion goes through lock-review)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/lock-review":{"post":{"summary":"Lock the review: the visit is completed","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/reopen-review":{"post":{"summary":"Re-open a locked review (back to Under Review)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/reset":{"post":{"summary":"Reset a visit: clear every score and result (emits IrwVisitReset)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/teams":{"get":{"summary":"Who is on which team, per template (standing rosters)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"templateId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"openVisits":{"type":"integer"},"visitCount":{"type":"integer"}},"required":["id","name","yearName","isCurrentYear","openVisits","visitCount"],"additionalProperties":false}},"templateId":{"type":"string","nullable":true},"teams":{"type":"array","items":{"type":"object","properties":{"teamTemplateId":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["building","per_room","per_teacher"]},"isActive":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"roleLabel":{"type":"string"},"title":{"type":"string","nullable":true},"isLead":{"type":"boolean"}},"required":["userId","name","roleLabel","title","isLead"],"additionalProperties":false}}},"required":["teamTemplateId","name","scope","isActive","members"],"additionalProperties":false}},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"roleLabel":{"type":"string"},"title":{"type":"string","nullable":true}},"required":["userId","name","roleLabel","title"],"additionalProperties":false}},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["templates","templateId","teams","people","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/teams/assignments":{"post":{"summary":"Put a member on a team for every visit of its template (emits IrwTeamRosterChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teamTemplateId":{"type":"string","minLength":1,"maxLength":64},"userId":{"type":"string","minLength":1,"maxLength":64},"isLead":{"type":"boolean","default":false}},"required":["teamTemplateId","userId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"propagation":{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string"},"reason":{"type":"string"}},"required":["school","reason"],"additionalProperties":false}}},"required":["changed","skipped"],"additionalProperties":false}},"required":["ok","message","propagation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Take a member off a team (emits IrwTeamRosterChanged)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"teamTemplateId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"propagation":{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string"},"reason":{"type":"string"}},"required":["school","reason"],"additionalProperties":false}}},"required":["changed","skipped"],"additionalProperties":false}},"required":["ok","message","propagation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/members":{"get":{"summary":"A visit team’s members and who can be added","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"roleLabel":{"type":"string"},"isLead":{"type":"boolean"},"isActiveWalker":{"type":"boolean"},"hasScored":{"type":"boolean"}},"required":["memberId","userId","name","email","roleLabel","isLead","isActiveWalker","hasScored"],"additionalProperties":false}},"candidates":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"roleLabel":{"type":"string"},"title":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["userId","name","roleLabel","title","email"],"additionalProperties":false}},"can":{"type":"object","properties":{"manage":{"type":"boolean"},"restrictRemoval":{"type":"boolean"}},"required":["manage","restrictRemoval"],"additionalProperties":false}},"required":["members","candidates","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a member to a visit team (also the template roster and open visits)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"isLead":{"type":"boolean","default":false}},"required":["userId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"propagation":{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string"},"reason":{"type":"string"}},"required":["school","reason"],"additionalProperties":false}}},"required":["changed","skipped"],"additionalProperties":false}},"required":["ok","message","propagation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/members/{memberId}":{"patch":{"summary":"\"Walking now\" toggle","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActiveWalker":{"type":"boolean"}},"required":["isActiveWalker"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a member from a visit team (and the template roster)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"propagation":{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string"},"reason":{"type":"string"}},"required":["school","reason"],"additionalProperties":false}}},"required":["changed","skipped"],"additionalProperties":false}},"required":["ok","message","propagation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/sections":{"get":{"summary":"Who scores which section","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"userId":{"type":"string","nullable":true}},"required":["id","name","userId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"}},"required":["userId","name","isLead"],"additionalProperties":false}}},"required":["sections","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Replace the section assignments (emits IrwSectionsAssigned)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string","minLength":1,"maxLength":64},"userId":{"type":"string","minLength":1,"maxLength":64}},"required":["sectionId","userId"],"additionalProperties":false},"maxItems":200}},"required":["assignments"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"userId":{"type":"string","nullable":true}},"required":["id","name","userId"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"}},"required":["userId","name","isLead"],"additionalProperties":false}}},"required":["sections","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}":{"patch":{"summary":"Save the narrative or mark the team complete / incomplete","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"narrativeSummary":{"type":"string","maxLength":20000,"nullable":true},"isComplete":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"warning":{"type":"string","nullable":true},"isComplete":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"narrativeSummary":{"type":"string","nullable":true},"narrativeIsAi":{"type":"boolean"},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"]}},"required":["ok","message","warning","isComplete","lockedAt","lockedByName","percentageMet","narrativeSummary","narrativeIsAi","visitStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"The scoring screen: questions, rooms/teachers, answers, locks, flags, evidence","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"teamTemplateId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["building","per_room","per_teacher"]},"isComplete":{"type":"boolean"},"completedAt":{"type":"string","nullable":true},"lockedAt":{"type":"string","nullable":true},"lockedByUserId":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"narrativeSummary":{"type":"string","nullable":true},"narrativeIsAi":{"type":"boolean"},"isRemoved":{"type":"boolean"}},"required":["id","teamTemplateId","name","description","scope","isComplete","completedAt","lockedAt","lockedByUserId","lockedByName","percentageMet","narrativeSummary","narrativeIsAi","isRemoved"],"additionalProperties":false},"visit":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"visitRound":{"type":"integer"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"yearName":{"type":"string"},"schoolYearId":{"type":"string"}},"required":["id","schoolId","schoolName","visitDate","visitRound","status","yearName","schoolYearId"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scoringScopeOverride":{"type":"string","enum":["building","per_room","per_teacher"],"nullable":true},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string","nullable":true},"indicatorType":{"type":"string","enum":["yes_no","yes_no_na","percentage","numeric","text"]},"isRequired":{"type":"boolean"},"allowNA":{"type":"boolean"},"weight":{"type":"number"}},"required":["id","label","description","indicatorType","isRequired","allowNA","weight"],"additionalProperties":false}}},"required":["id","name","description","scoringScopeOverride","indicators"],"additionalProperties":false}},"sectionFilter":{"type":"object","properties":{"applied":{"type":"boolean"},"assigned":{"type":"array","items":{"type":"string"}}},"required":["applied","assigned"],"additionalProperties":false},"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityType":{"type":"string","enum":["building","room","teacher"]},"entityLabel":{"type":"string"},"sectionId":{"type":"string","nullable":true},"teacherPersonId":{"type":"string","nullable":true},"roomId":{"type":"string","nullable":true},"scores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"indicatorId":{"type":"string"},"yesNoValue":{"type":"boolean","nullable":true},"numericValue":{"type":"number","nullable":true},"textValue":{"type":"string","nullable":true},"isNA":{"type":"boolean"},"notes":{"type":"string","nullable":true},"scoredByUserId":{"type":"string","nullable":true},"scoredByName":{"type":"string","nullable":true},"lockedByUserId":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"lockedAt":{"type":"string","nullable":true},"flag":{"type":"object","properties":{"id":{"type":"string"},"flagType":{"type":"string","enum":["remediation","commendation"]},"isResolved":{"type":"boolean"}},"required":["id","flagType","isResolved"],"additionalProperties":false,"nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"isImage":{"type":"boolean"},"uploadedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","filename","mimeType","sizeBytes","isImage","uploadedByUserId","createdAt"],"additionalProperties":false}}},"required":["id","indicatorId","yesNoValue","numericValue","textValue","isNA","notes","scoredByUserId","scoredByName","lockedByUserId","lockedByName","lockedAt","flag","attachments"],"additionalProperties":false}}},"required":["id","entityType","entityLabel","sectionId","teacherPersonId","roomId","scores"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"isLead":{"type":"boolean"},"isActiveWalker":{"type":"boolean"}},"required":["memberId","userId","name","isLead","isActiveWalker"],"additionalProperties":false}},"memberLockStatus":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}},"required":["userId","name","count"],"additionalProperties":false}},"roster":{"type":"object","properties":{"rule":{"type":"string","enum":["teachers","all_staff"]},"teachers":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"fullName":{"type":"string"}},"required":["personId","fullName"],"additionalProperties":false}}},"required":["rule","teachers"],"additionalProperties":false,"nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"nullable":true},"round1":{"type":"object","properties":{"unresolvedFlags":{"type":"array","items":{"type":"object","properties":{"indicatorId":{"type":"string"},"label":{"type":"string"},"teamName":{"type":"string"},"comment":{"type":"string","nullable":true}},"required":["indicatorId","label","teamName","comment"],"additionalProperties":false}},"scores":{"type":"object","additionalProperties":{"type":"object","properties":{"yesNoValue":{"type":"boolean","nullable":true},"numericValue":{"type":"number","nullable":true},"textValue":{"type":"string","nullable":true},"isNA":{"type":"boolean"},"notes":{"type":"string","nullable":true},"entityLabel":{"type":"string"},"aggregated":{"type":"string","nullable":true}},"required":["yesNoValue","numericValue","textValue","isNA","notes","entityLabel","aggregated"],"additionalProperties":false}}},"required":["unresolvedFlags","scores"],"additionalProperties":false,"nullable":true},"me":{"type":"object","properties":{"userId":{"type":"string","nullable":true},"onVisitRoster":{"type":"boolean"},"onTeam":{"type":"boolean"}},"required":["userId","onVisitRoster","onTeam"],"additionalProperties":false},"caps":{"type":"object","properties":{"score":{"type":"boolean"},"overrideScoreLock":{"type":"boolean"},"unlockScores":{"type":"boolean"},"lockTeam":{"type":"boolean"},"forceLock":{"type":"boolean"},"unlockTeam":{"type":"boolean"},"deleteEntities":{"type":"boolean"},"addEntities":{"type":"boolean"},"flag":{"type":"boolean"},"walker":{"type":"boolean"},"reset":{"type":"boolean"},"narrative":{"type":"boolean"},"generateSummary":{"type":"boolean"},"upload":{"type":"boolean"}},"required":["score","overrideScoreLock","unlockScores","lockTeam","forceLock","unlockTeam","deleteEntities","addEntities","flag","walker","reset","narrative","generateSummary","upload"],"additionalProperties":false},"state":{"type":"object","properties":{"roundClosed":{"type":"boolean"},"visitCompleted":{"type":"boolean"},"readOnlyReason":{"type":"string","nullable":true}},"required":["roundClosed","visitCompleted","readOnlyReason"],"additionalProperties":false},"thresholds":{"type":"object","properties":{"met":{"type":"number"},"partial":{"type":"number"}},"required":["met","partial"],"additionalProperties":false},"maxUploadBytes":{"type":"number"}},"required":["team","visit","sections","sectionFilter","entities","members","memberLockStatus","roster","rooms","round1","me","caps","state","thresholds","maxUploadBytes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/lock":{"post":{"summary":"Lock Team: % met written, AI narrative drafted (emits IrwTeamLocked)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"warning":{"type":"string","nullable":true},"isComplete":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"narrativeSummary":{"type":"string","nullable":true},"narrativeIsAi":{"type":"boolean"},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"]}},"required":["ok","message","warning","isComplete","lockedAt","lockedByName","percentageMet","narrativeSummary","narrativeIsAi","visitStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Unlock a team for editing (emits IrwTeamUnlocked)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"warning":{"type":"string","nullable":true},"isComplete":{"type":"boolean"},"lockedAt":{"type":"string","nullable":true},"lockedByName":{"type":"string","nullable":true},"percentageMet":{"type":"number","nullable":true},"narrativeSummary":{"type":"string","nullable":true},"narrativeIsAi":{"type":"boolean"},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"]}},"required":["ok","message","warning","isComplete","lockedAt","lockedByName","percentageMet","narrativeSummary","narrativeIsAi","visitStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/remove":{"post":{"summary":"Remove a team from this walkthrough (data kept)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/restore":{"post":{"summary":"Restore a removed team","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/reset":{"post":{"summary":"Reset Team: clear its scores and flags, keep rooms/teachers (emits IrwTeamReset)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/entities":{"post":{"summary":"Add a room or a teacher (from the school’s DEP staff roster)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["room","teacher"]},"entityLabel":{"type":"string","maxLength":200},"roomId":{"type":"string","maxLength":64},"teacherPersonId":{"type":"string","maxLength":64}},"required":["entityType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"entityType":{"type":"string","enum":["building","room","teacher"]},"entityLabel":{"type":"string"},"sortOrder":{"type":"integer"},"teacherPersonId":{"type":"string","nullable":true},"roomId":{"type":"string","nullable":true},"sectionId":{"type":"string","nullable":true}},"required":["id","entityType","entityLabel","sortOrder","teacherPersonId","roomId","sectionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/entities/{entityId}":{"delete":{"summary":"Remove a room or teacher and its answers","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"entityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/scores":{"post":{"summary":"Save one answer (emits IrwScoresSaved)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","minLength":1,"maxLength":64},"indicatorId":{"type":"string","minLength":1,"maxLength":64},"yesNoValue":{"type":"boolean","nullable":true},"numericValue":{"type":"number","nullable":true},"textValue":{"type":"string","maxLength":5000,"nullable":true},"isNA":{"type":"boolean"},"notes":{"type":"string","maxLength":5000,"nullable":true}},"required":["entityId","indicatorId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scoreId":{"type":"string"},"entityId":{"type":"string"},"indicatorId":{"type":"string"},"savedAt":{"type":"string"},"scoredByUserId":{"type":"string","nullable":true},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"]}},"required":["scoreId","entityId","indicatorId","savedAt","scoredByUserId","visitStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/lock-mine":{"post":{"summary":"Lock My Scores (emits IrwScoresLocked)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer"},"lockedAt":{"type":"string","nullable":true},"message":{"type":"string"}},"required":["count","lockedAt","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/scores/{scoreId}/lock":{"delete":{"summary":"Unlock one answer (emits IrwScoreUnlocked)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"scoreId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/previous":{"get":{"summary":"Last school year’s answers for this team at this school","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previousYear":{"type":"string","nullable":true},"scores":{"type":"object","additionalProperties":{"type":"object","properties":{"yesNoValue":{"type":"boolean","nullable":true},"numericValue":{"type":"number","nullable":true},"textValue":{"type":"string","nullable":true},"isNA":{"type":"boolean"},"notes":{"type":"string","nullable":true},"entityLabel":{"type":"string"},"aggregated":{"type":"string","nullable":true}},"required":["yesNoValue","numericValue","textValue","isNA","notes","entityLabel","aggregated"],"additionalProperties":false}}},"required":["previousYear","scores"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/generate-summary":{"post":{"summary":"Draft the team narrative with AI (preview, or save)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"boolean","default":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"string"},"preview":{"type":"boolean"}},"required":["summary","preview"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/entities/{entityId}/indicators/{indicatorId}/attachments":{"post":{"summary":"Attach a photo or PDF to an answer (multipart \"file\"; emits IrwEvidenceUploaded)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"entityId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"indicatorId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"isImage":{"type":"boolean"},"uploadedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","filename","mimeType","sizeBytes","isImage","uploadedByUserId","createdAt"],"additionalProperties":false},"scoreId":{"type":"string"}},"required":["attachment","scoreId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/score-attachments/{id}/file":{"get":{"summary":"Open an evidence file","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/irw/score-attachments/{id}":{"delete":{"summary":"Remove evidence from an answer (emits IrwEvidenceDeleted)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/flags":{"get":{"summary":"Flagged and commended answers on a visit (Remediation Review)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visit":{"type":"object","properties":{"id":{"type":"string"},"schoolName":{"type":"string"},"visitRound":{"type":"integer"},"yearName":{"type":"string"}},"required":["id","schoolName","visitRound","yearName"],"additionalProperties":false},"counts":{"type":"object","properties":{"total":{"type":"integer"},"unresolved":{"type":"integer"},"resolved":{"type":"integer"},"commendations":{"type":"integer"}},"required":["total","unresolved","resolved","commendations"],"additionalProperties":false},"groups":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"flagId":{"type":"string"},"flagType":{"type":"string","enum":["remediation","commendation"]},"indicatorLabel":{"type":"string"},"sectionName":{"type":"string"},"entityLabel":{"type":"string"},"comment":{"type":"string","nullable":true},"flaggedAt":{"type":"string"},"flaggedByName":{"type":"string"},"isResolved":{"type":"boolean"},"resolvedAt":{"type":"string","nullable":true},"resolvedByName":{"type":"string","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"isEscalated":{"type":"boolean"},"visitTeamId":{"type":"string"}},"required":["flagId","flagType","indicatorLabel","sectionName","entityLabel","comment","flaggedAt","flaggedByName","isResolved","resolvedAt","resolvedByName","resolutionNotes","isEscalated","visitTeamId"],"additionalProperties":false}}},"required":["teamName","items"],"additionalProperties":false}},"can":{"type":"object","properties":{"resolve":{"type":"boolean"}},"required":["resolve"],"additionalProperties":false},"roundClosed":{"type":"boolean"}},"required":["visit","counts","groups","can","roundClosed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visit-teams/{id}/flags":{"post":{"summary":"Flag for remediation, commend, switch or clear an answer","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scoreId":{"type":"string","maxLength":64},"entityId":{"type":"string","maxLength":64},"indicatorId":{"type":"string","maxLength":64},"isFlagged":{"type":"boolean"},"flagType":{"type":"string","enum":["remediation","commendation"],"default":"remediation"}},"required":["isFlagged"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"flagged":{"type":"boolean"},"flagType":{"type":"string","enum":["remediation","commendation"],"nullable":true},"flagId":{"type":"string","nullable":true},"scoreId":{"type":"string"}},"required":["flagged","flagType","flagId","scoreId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/visits/{id}/flags/resolve":{"post":{"summary":"Resolve flags with notes (remediation answers become Yes; emits IrwFlagsResolved)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"flagIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":500},"resolutionNotes":{"type":"string","minLength":1,"maxLength":5000}},"required":["flagIds","resolutionNotes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resolved":{"type":"integer"},"message":{"type":"string"}},"required":["resolved","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/review-cycles":{"get":{"summary":"Is this round’s review open or closed","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"schoolYearId","required":true},{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true},"reopenedAt":{"type":"string","nullable":true},"reopenedByName":{"type":"string","nullable":true},"canChange":{"type":"boolean"}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName","reopenedAt","reopenedByName","canChange"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/review-cycles/close":{"post":{"summary":"Close a round’s review: its data is frozen (emits IrwReviewCycleClosed)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"round":{"type":"integer","minimum":1,"maximum":9}},"required":["schoolYearId","round"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true},"reopenedAt":{"type":"string","nullable":true},"reopenedByName":{"type":"string","nullable":true},"canChange":{"type":"boolean"}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName","reopenedAt","reopenedByName","canChange"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/review-cycles/reopen":{"post":{"summary":"Reopen a closed round (emits IrwReviewCycleReopened)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolYearId":{"type":"string","minLength":1,"maxLength":64},"round":{"type":"integer","minimum":1,"maximum":9}},"required":["schoolYearId","round"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true},"reopenedAt":{"type":"string","nullable":true},"reopenedByName":{"type":"string","nullable":true},"canChange":{"type":"boolean"}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName","reopenedAt","reopenedByName","canChange"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports":{"get":{"summary":"IRW reports: review management, superintendent and school reports by year and round","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"yearId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"years":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"selectedYearId":{"type":"string","nullable":true},"rounds":{"type":"array","items":{"type":"integer"}},"selectedRound":{"type":"integer"},"currentRound":{"type":"integer"},"currentYearId":{"type":"string","nullable":true},"reviewCycle":{"type":"object","properties":{"schoolYearId":{"type":"string"},"yearName":{"type":"string"},"round":{"type":"integer"},"status":{"type":"string","enum":["open","closed"]},"closedAt":{"type":"string","nullable":true},"closedByName":{"type":"string","nullable":true}},"required":["schoolYearId","yearName","round","status","closedAt","closedByName"],"additionalProperties":false,"nullable":true},"reviewManagement":{"type":"object","properties":{"awaiting":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"teamsLocked":{"type":"integer"},"teamsTotal":{"type":"integer"}},"required":["visitId","schoolName","visitDate","teamsLocked","teamsTotal"],"additionalProperties":false}},"locked":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["visitId","schoolName","visitDate","completedAt"],"additionalProperties":false}}},"required":["awaiting","locked"],"additionalProperties":false,"nullable":true},"superintendent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportType":{"type":"string","enum":["school","superintendent"]},"status":{"type":"string","enum":["draft","approved","published"]},"schoolYearId":{"type":"string","nullable":true},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"visitRound":{"type":"integer","nullable":true},"visitId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"templateName":{"type":"string","nullable":true},"visitDate":{"type":"string","nullable":true},"schoolCount":{"type":"integer","nullable":true},"generatedAt":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"approvedByName":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"sentCount":{"type":"integer"},"canDelete":{"type":"boolean"}},"required":["id","reportType","status","schoolYearId","yearName","isCurrentYear","visitRound","visitId","schoolId","schoolName","templateName","visitDate","schoolCount","generatedAt","approvedAt","approvedByName","publishedAt","sentCount","canDelete"],"additionalProperties":false}},"school":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportType":{"type":"string","enum":["school","superintendent"]},"status":{"type":"string","enum":["draft","approved","published"]},"schoolYearId":{"type":"string","nullable":true},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"visitRound":{"type":"integer","nullable":true},"visitId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"templateName":{"type":"string","nullable":true},"visitDate":{"type":"string","nullable":true},"schoolCount":{"type":"integer","nullable":true},"generatedAt":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"approvedByName":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"sentCount":{"type":"integer"},"canDelete":{"type":"boolean"}},"required":["id","reportType","status","schoolYearId","yearName","isCurrentYear","visitRound","visitId","schoolId","schoolName","templateName","visitDate","schoolCount","generatedAt","approvedAt","approvedByName","publishedAt","sentCount","canDelete"],"additionalProperties":false}},"generateYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","startDate","endDate","isCurrent"],"additionalProperties":false}},"can":{"type":"object","properties":{"manage":{"type":"boolean"},"generateSuperintendent":{"type":"boolean"},"lockReview":{"type":"boolean"}},"required":["manage","generateSuperintendent","lockReview"],"additionalProperties":false}},"required":["years","selectedYearId","rounds","selectedRound","currentRound","currentYearId","reviewCycle","reviewManagement","superintendent","school","generateYears","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/summary":{"get":{"summary":"School summaries: schools with a school report in a round","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rounds":{"type":"array","items":{"type":"integer"}},"selectedRound":{"type":"integer"},"schools":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"reportId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"yearName":{"type":"string"},"status":{"type":"string","enum":["draft","approved","published"]},"overall":{"type":"number","nullable":true}},"required":["visitId","reportId","schoolName","visitDate","yearName","status","overall"],"additionalProperties":false}}},"required":["rounds","selectedRound","schools"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/summary/{visitId}":{"get":{"summary":"One school summary: live overall score, rating, team scores, overview, next steps","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"visitId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"yearName":{"type":"string"},"visitRound":{"type":"integer"},"report":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","approved","published"]},"overview":{"type":"string"},"nextSteps":{"type":"string"}},"required":["id","status","overview","nextSteps"],"additionalProperties":false,"nullable":true},"overall":{"type":"number","nullable":true},"rating":{"type":"object","properties":{"label":{"type":"string","enum":["Met","Partially Met","Not Met","Not Yet Scored"]},"tone":{"type":"string","enum":["met","partial","notmet","none"]}},"required":["label","tone"],"additionalProperties":false},"teams":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"percentageMet":{"type":"number","nullable":true},"rating":{"type":"object","properties":{"label":{"type":"string","enum":["Met","Partially Met","Not Met","Not Yet Scored"]},"tone":{"type":"string","enum":["met","partial","notmet","none"]}},"required":["label","tone"],"additionalProperties":false}},"required":["teamName","percentageMet","rating"],"additionalProperties":false}},"thresholds":{"type":"object","properties":{"met":{"type":"number"},"partial":{"type":"number"}},"required":["met","partial"],"additionalProperties":false},"principal":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"],"additionalProperties":false,"nullable":true},"can":{"type":"object","properties":{"email":{"type":"boolean"}},"required":["email"],"additionalProperties":false}},"required":["visitId","schoolName","visitDate","yearName","visitRound","report","overall","rating","teams","thresholds","principal","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/visit/{visitId}":{"get":{"summary":"Report state for a visit (for the visit page buttons)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"visitId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"report":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","approved","published"]},"generatedAt":{"type":"string","nullable":true}},"required":["id","status","generatedAt"],"additionalProperties":false,"nullable":true},"canGenerate":{"type":"boolean"},"reason":{"type":"string","nullable":true},"teamsComplete":{"type":"integer"},"teamsTotal":{"type":"integer"},"canEscalate":{"type":"boolean"},"escalateReason":{"type":"string","nullable":true},"flaggedCount":{"type":"integer"},"canViewReports":{"type":"boolean"}},"required":["report","canGenerate","reason","teamsComplete","teamsTotal","canEscalate","escalateReason","flaggedCount","canViewReports"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/school":{"post":{"summary":"Generate the school report for a visit (emits IrwReportGenerated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visitId":{"type":"string","minLength":1,"maxLength":64}},"required":["visitId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"warning":{"type":"string","nullable":true},"regenerated":{"type":"boolean"}},"required":["id","warning","regenerated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/superintendent":{"post":{"summary":"Generate the superintendent report for a year and round (emits IrwReportGenerated)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"round":{"type":"integer","minimum":1,"maximum":9},"schoolYearId":{"type":"string","maxLength":64}},"required":["round"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"warning":{"type":"string","nullable":true},"regenerated":{"type":"boolean"}},"required":["id","warning","regenerated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/{id}":{"get":{"summary":"One report for the editor","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"report":{"type":"object","properties":{"id":{"type":"string"},"reportType":{"type":"string","enum":["school","superintendent"]},"status":{"type":"string","enum":["draft","approved","published"]},"schoolYearId":{"type":"string","nullable":true},"yearName":{"type":"string"},"isCurrentYear":{"type":"boolean"},"visitRound":{"type":"integer","nullable":true},"visitId":{"type":"string","nullable":true},"schoolId":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true},"templateName":{"type":"string","nullable":true},"visitDate":{"type":"string","nullable":true},"schoolCount":{"type":"integer","nullable":true},"generatedAt":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true},"approvedByName":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"sentCount":{"type":"integer"},"canDelete":{"type":"boolean"},"generatedByName":{"type":"string","nullable":true},"roundClosed":{"type":"boolean"},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"],"nullable":true},"addendumFile":{"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"isImage":{"type":"boolean"}},"required":["fileName","mimeType","sizeBytes","isImage"],"additionalProperties":false,"nullable":true},"school":{"type":"object","properties":{"kind":{"type":"string","enum":["school"]},"districtName":{"type":"string"},"districtAddress":{"type":"string","nullable":true},"districtPhone":{"type":"string","nullable":true},"districtEmail":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"superintendentName":{"type":"string","nullable":true},"superintendentTitle":{"type":"string","nullable":true},"boardMembers":{"type":"string","nullable":true},"reportHeader":{"type":"string","nullable":true},"reportSubhead":{"type":"string","nullable":true},"visitId":{"type":"string"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"principalName":{"type":"string","nullable":true},"visitDate":{"type":"string"},"academicYear":{"type":"string"},"templateName":{"type":"string"},"visitRound":{"type":"integer"},"overview":{"type":"string"},"nextSteps":{"type":"string"},"teamSummaries":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"narrative":{"type":"string"},"percentageMet":{"type":"number","nullable":true},"isComplete":{"type":"boolean"}},"required":["teamName","narrative","percentageMet","isComplete"],"additionalProperties":false}},"remediationItems":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"indicatorLabel":{"type":"string"},"comment":{"type":"string","nullable":true},"isResolved":{"type":"boolean"},"resolutionNotes":{"type":"string","nullable":true},"isEscalated":{"type":"boolean"},"round":{"type":"integer"}},"required":["teamName","indicatorLabel","comment","isResolved","resolutionNotes","isEscalated","round"],"additionalProperties":false}},"newItems":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"indicatorLabel":{"type":"string"},"comment":{"type":"string","nullable":true},"isResolved":{"type":"boolean"},"resolutionNotes":{"type":"string","nullable":true},"isEscalated":{"type":"boolean"},"round":{"type":"integer"}},"required":["teamName","indicatorLabel","comment","isResolved","resolutionNotes","isEscalated","round"],"additionalProperties":false}},"commendations":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"indicatorLabel":{"type":"string"},"comment":{"type":"string","nullable":true}},"required":["teamName","indicatorLabel","comment"],"additionalProperties":false}},"indicatorImages":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"indicatorLabel":{"type":"string"},"entityLabel":{"type":"string"},"images":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string"}},"required":["attachmentId","fileName","mimeType"],"additionalProperties":false}}},"required":["teamName","indicatorLabel","entityLabel","images"],"additionalProperties":false}},"meetingNotes":{"type":"string"},"addendum":{"type":"object","properties":{"discussionPoints":{"type":"string"},"principalFeedback":{"type":"string"},"actionItems":{"type":"string"},"uploadedText":{"type":"string"}},"required":["discussionPoints","principalFeedback","actionItems","uploadedText"],"additionalProperties":false},"sentHistory":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"email":{"type":"string"},"format":{"type":"string"},"sentBy":{"type":"string"}},"required":["at","email","format","sentBy"],"additionalProperties":false}}},"required":["kind","districtName","districtAddress","districtPhone","districtEmail","logoUrl","superintendentName","superintendentTitle","boardMembers","reportHeader","reportSubhead","visitId","schoolId","schoolName","principalName","visitDate","academicYear","templateName","visitRound","overview","nextSteps","teamSummaries","remediationItems","newItems","commendations","indicatorImages"],"additionalProperties":false,"nullable":true},"superintendent":{"type":"object","properties":{"kind":{"type":"string","enum":["superintendent"]},"districtName":{"type":"string"},"districtAddress":{"type":"string","nullable":true},"districtPhone":{"type":"string","nullable":true},"districtEmail":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"superintendentName":{"type":"string","nullable":true},"superintendentTitle":{"type":"string","nullable":true},"boardMembers":{"type":"string","nullable":true},"reportHeader":{"type":"string","nullable":true},"reportSubhead":{"type":"string","nullable":true},"schoolYearId":{"type":"string"},"academicYear":{"type":"string"},"visitRound":{"type":"integer"},"generatedDate":{"type":"string"},"overview":{"type":"string"},"nextSteps":{"type":"string"},"districtAverages":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"average":{"type":"number","nullable":true}},"required":["teamName","average"],"additionalProperties":false}},"schoolSummaries":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"principalName":{"type":"string","nullable":true},"visitDate":{"type":"string"},"overall":{"type":"number","nullable":true},"teams":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"percentageMet":{"type":"number","nullable":true},"narrative":{"type":"string"}},"required":["teamName","percentageMet","narrative"],"additionalProperties":false}},"flaggedItems":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"indicatorLabel":{"type":"string"},"comment":{"type":"string","nullable":true},"isResolved":{"type":"boolean"},"resolutionNotes":{"type":"string","nullable":true},"isEscalated":{"type":"boolean"},"round":{"type":"integer"}},"required":["teamName","indicatorLabel","comment","isResolved","resolutionNotes","isEscalated","round"],"additionalProperties":false}}},"required":["visitId","schoolName","principalName","visitDate","overall","teams","flaggedItems"],"additionalProperties":false}}},"required":["kind","districtName","districtAddress","districtPhone","districtEmail","logoUrl","superintendentName","superintendentTitle","boardMembers","reportHeader","reportSubhead","schoolYearId","academicYear","visitRound","generatedDate","overview","nextSteps","districtAverages","schoolSummaries"],"additionalProperties":false,"nullable":true}},"required":["id","reportType","status","schoolYearId","yearName","isCurrentYear","visitRound","visitId","schoolId","schoolName","templateName","visitDate","schoolCount","generatedAt","approvedAt","approvedByName","publishedAt","sentCount","canDelete","generatedByName","roundClosed","visitStatus","addendumFile","school","superintendent"],"additionalProperties":false},"principal":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"],"additionalProperties":false,"nullable":true},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"approve":{"type":"boolean"},"email":{"type":"boolean"},"delete":{"type":"boolean"},"ai":{"type":"boolean"}},"required":["edit","approve","email","delete","ai"],"additionalProperties":false}},"required":["report","principal","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a report, or approve / publish / revert it (emits IrwReportUpdated / IrwReportStatusChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overview":{"type":"string","maxLength":40000},"nextSteps":{"type":"string","maxLength":40000},"meetingNotes":{"type":"string","maxLength":40000},"teamSummaries":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string","maxLength":200},"narrative":{"type":"string","maxLength":40000}},"required":["teamName","narrative"],"additionalProperties":false},"maxItems":50},"schoolSummaries":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string","maxLength":64},"teams":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string","maxLength":200},"narrative":{"type":"string","maxLength":40000}},"required":["teamName","narrative"],"additionalProperties":false},"maxItems":50}},"required":["visitId","teams"],"additionalProperties":false},"maxItems":200},"addendum":{"type":"object","properties":{"discussionPoints":{"type":"string"},"principalFeedback":{"type":"string"},"actionItems":{"type":"string"},"uploadedText":{"type":"string"}},"additionalProperties":false},"status":{"type":"string","enum":["draft","approved","published"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a report (current year, open round; soft; emits IrwReportDeleted)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/{id}/next-steps":{"post":{"summary":"Draft next steps with AI (preview by default)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nextSteps":{"type":"string"},"preview":{"type":"boolean"},"warning":{"type":"string","nullable":true}},"required":["nextSteps","preview","warning"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/{id}/addendum-file":{"post":{"summary":"Attach the addendum document (multipart field \"file\"; PDF, DOCX or image)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"isImage":{"type":"boolean"}},"required":["fileName","mimeType","sizeBytes","isImage"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"View or download the addendum document (binary)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Remove the addendum document","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/{id}/email":{"post":{"summary":"Email the report PDF to the principal (approved or published; emits IrwReportEmailed)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toEmail":{"type":"string","maxLength":320},"format":{"type":"string","enum":["comprehensive","condensed","summary"],"default":"comprehensive"},"placement":{"type":"string","enum":["embedded","separate"],"default":"embedded"},"includeAddendum":{"type":"boolean","default":true},"message":{"type":"string","maxLength":4000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"sentTo":{"type":"array","items":{"type":"string"}}},"required":["success","sentTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/{id}/pdf":{"get":{"summary":"Report PDF (school: comprehensive / condensed / summary; superintendent)","tags":["Instructional Review Walkthroughs"],"description":"Binary application/pdf.","parameters":[{"schema":{"type":"string","enum":["comprehensive","condensed","summary"],"default":"comprehensive"},"in":"query","name":"format","required":false},{"schema":{"type":"string","enum":["embedded","separate"],"default":"embedded"},"in":"query","name":"placement","required":false},{"schema":{"type":"string","maxLength":1},"in":"query","name":"download","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/reports/summary/{visitId}/pdf":{"get":{"summary":"School summary PDF with the live overall score","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":1},"in":"query","name":"download","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"visitId","required":true}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/pdf/flagged-items/{visitId}":{"get":{"summary":"Flagged items report for a visit (PDF)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":1},"in":"query","name":"download","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"visitId","required":true}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/pdf/escalation/{visitId}":{"post":{"summary":"Escalation report (Round 2+): escalates still-open Round 1 items, then renders the PDF (emits IrwFlagsEscalated)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"visitId","required":true}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/status/pdf":{"get":{"summary":"Audit status PDF with the current filters","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"anyOf":[{"type":"string","enum":["all"]},{"type":"integer","minimum":1,"maximum":9}]},"in":"query","name":"round","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"schools","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"templates","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"statuses","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"leads","required":false},{"schema":{"type":"string","maxLength":1},"in":"query","name":"download","required":false}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/dashboard":{"get":{"summary":"IRW home dashboard (executive or standard, by IRW role)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":2},"in":"query","name":"round","required":false},{"schema":{"type":"string","enum":["executive","standard"]},"in":"query","name":"view","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]},"canSwitch":{"type":"boolean"},"yearName":{"enum":["null"],"nullable":true}},"required":["kind","canSwitch","yearName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["standard"]},"canSwitch":{"type":"boolean"},"yearName":{"type":"string"},"yearId":{"type":"string"},"round":{"type":"integer"},"mySchools":{"type":"boolean"},"isAdmin":{"type":"boolean"},"stats":{"type":"object","properties":{"schools":{"type":"integer"},"inProgress":{"type":"integer"},"underReview":{"type":"integer"},"completed":{"type":"integer"},"total":{"type":"integer"}},"required":["schools","inProgress","underReview","completed","total"],"additionalProperties":false},"upcoming":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["visit","event"]},"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"sub":{"type":"string"},"href":{"type":"string","nullable":true}},"required":["kind","id","title","date","sub","href"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"updatedAt":{"type":"string"}},"required":["id","schoolName","visitDate","status","updatedAt"],"additionalProperties":false}}},"required":["kind","canSwitch","yearName","yearId","round","mySchools","isAdmin","stats","upcoming","recent"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["executive"]},"canSwitch":{"type":"boolean"},"yearName":{"type":"string"},"yearId":{"type":"string"},"round":{"type":"integer"},"currentRound":{"type":"integer"},"weekCount":{"type":"integer"},"kpis":{"type":"object","properties":{"draft":{"type":"integer"},"inProgress":{"type":"integer"},"underReview":{"type":"integer"},"completed":{"type":"integer"},"reportsAwaiting":{"type":"integer"},"schoolsAttention":{"type":"integer"},"openCritical":{"type":"integer"},"schoolsCompleted":{"type":"integer"},"reportsSubmitted7d":{"type":"integer"},"compliance":{"type":"number","nullable":true}},"required":["draft","inProgress","underReview","completed","reportsAwaiting","schoolsAttention","openCritical","schoolsCompleted","reportsSubmitted7d","compliance"],"additionalProperties":false},"attention":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"score":{"type":"number","nullable":true},"reason":{"type":"string"},"visitId":{"type":"string"}},"required":["schoolId","schoolName","score","reason","visitId"],"additionalProperties":false}},"underReview":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string"},"teamsLocked":{"type":"integer"},"teamsTotal":{"type":"integer"},"ready":{"type":"boolean"}},"required":["visitId","schoolName","visitDate","teamsLocked","teamsTotal","ready"],"additionalProperties":false}},"recentlyLocked":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"schoolName":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["visitId","schoolName","completedAt"],"additionalProperties":false}},"upcoming":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["visit","event"]},"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"sub":{"type":"string"},"href":{"type":"string","nullable":true}},"required":["kind","id","title","date","sub","href"],"additionalProperties":false}},"bySchool":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"score":{"type":"number","nullable":true}},"required":["schoolId","schoolName","score"],"additionalProperties":false}},"threshold":{"type":"number"}},"required":["kind","canSwitch","yearName","yearId","round","currentRound","weekCount","kpis","attention","underReview","recentlyLocked","upcoming","bySchool","threshold"],"additionalProperties":false}]},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/status":{"get":{"summary":"Audit status: one row per active team this school year","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"anyOf":[{"type":"string","enum":["all"]},{"type":"integer","minimum":1,"maximum":9}]},"in":"query","name":"round","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"schools","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"templates","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"statuses","required":false},{"schema":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"in":"query","name":"leads","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"yearName":{"type":"string","nullable":true},"rounds":{"type":"array","items":{"type":"integer"}},"round":{"anyOf":[{"type":"string","enum":["all"]},{"type":"integer"}]},"currentRound":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"visitTeamId":{"type":"string"},"schoolId":{"type":"string"},"school":{"type":"string"},"templateName":{"type":"string"},"academicYearLabel":{"type":"string"},"visitRound":{"type":"integer"},"visitDate":{"type":"string"},"visitStatus":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"visitStatusLabel":{"type":"string"},"visitCompletedAt":{"type":"string","nullable":true},"teamName":{"type":"string"},"teamLeadNames":{"type":"array","items":{"type":"string"}},"totalMembers":{"type":"integer"},"membersWithScores":{"type":"integer"},"membersSelfLocked":{"type":"integer"},"totalEntities":{"type":"integer"},"scoredEntities":{"type":"integer"},"teamLocked":{"type":"boolean"},"teamLockedAt":{"type":"string","nullable":true},"teamLockedByName":{"type":"string","nullable":true},"summaryGenerated":{"type":"boolean"},"summaryUpdatedAt":{"type":"string","nullable":true},"lastScoredAt":{"type":"string","nullable":true}},"required":["visitId","visitTeamId","schoolId","school","templateName","academicYearLabel","visitRound","visitDate","visitStatus","visitStatusLabel","visitCompletedAt","teamName","teamLeadNames","totalMembers","membersWithScores","membersSelfLocked","totalEntities","scoredEntities","teamLocked","teamLockedAt","teamLockedByName","summaryGenerated","summaryUpdatedAt","lastScoredAt"],"additionalProperties":false}},"allRows":{"type":"integer"},"options":{"type":"object","properties":{"schools":{"type":"array","items":{"type":"string"}},"templates":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"leads":{"type":"array","items":{"type":"string"}}},"required":["schools","templates","statuses","leads"],"additionalProperties":false},"kpis":{"type":"object","properties":{"teams":{"type":"integer"},"started":{"type":"integer"},"teamLocked":{"type":"integer"},"summaryDone":{"type":"integer"},"reviewLocked":{"type":"integer"}},"required":["teams","started","teamLocked","summaryDone","reviewLocked"],"additionalProperties":false},"can":{"type":"object","properties":{"email":{"type":"boolean"}},"required":["email"],"additionalProperties":false}},"required":["yearName","rounds","round","currentRound","rows","allRows","options","kpis","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/status/email":{"post":{"summary":"Email the audit status PDF (emits IrwReportEmailed)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","maxLength":320},"minItems":1,"maxItems":20},"cc":{"type":"array","items":{"type":"string","maxLength":320},"maxItems":20},"subject":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","maxLength":5000},"round":{"anyOf":[{"type":"string","enum":["all"]},{"type":"integer","minimum":1,"maximum":9}],"nullable":true},"schools":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"templates":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"statuses":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":10},"leads":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}},"required":["to","subject"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sent":{"type":"integer"}},"required":["ok","sent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/compare":{"get":{"summary":"Year-over-year comparison of completed walkthroughs","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"academicYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","name","isCurrent"],"additionalProperties":false}},"teamNames":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"newestVisitId":{"type":"string","nullable":true},"years":{"type":"object","additionalProperties":{"type":"object","properties":{"yearName":{"type":"string"},"visitId":{"type":"string"},"round":{"type":"integer"},"visitDate":{"type":"string"},"teams":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"percentageMet":{"type":"number","nullable":true}},"required":["name","percentageMet"],"additionalProperties":false}},"overall":{"type":"number","nullable":true}},"required":["yearName","visitId","round","visitDate","teams","overall"],"additionalProperties":false}}},"required":["schoolId","name","code","newestVisitId","years"],"additionalProperties":false}},"districtAverages":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"byYear":{"type":"object","additionalProperties":{"type":"number","nullable":true}}},"required":["teamName","byYear"],"additionalProperties":false}},"overallByYear":{"type":"object","additionalProperties":{"type":"number","nullable":true}},"restricted":{"type":"boolean"}},"required":["academicYears","teamNames","schools","districtAverages","overallByYear","restricted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/usage":{"get":{"summary":"IRW usage for this district (admin roles)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"timezone":{"type":"string"},"kpis":{"type":"object","properties":{"activeUsers":{"type":"object","properties":{"count":{"type":"integer"},"prior":{"type":"integer"},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"integer"}},"required":["day","value"],"additionalProperties":false}}},"required":["count","prior","daily"],"additionalProperties":false},"visitsCreated":{"type":"object","properties":{"count":{"type":"integer"},"prior":{"type":"integer"},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"integer"}},"required":["day","value"],"additionalProperties":false}}},"required":["count","prior","daily"],"additionalProperties":false},"visitsCompleted":{"type":"object","properties":{"count":{"type":"integer"},"prior":{"type":"integer"},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"integer"}},"required":["day","value"],"additionalProperties":false}}},"required":["count","prior","daily"],"additionalProperties":false},"reportsGenerated":{"type":"object","properties":{"count":{"type":"integer"},"prior":{"type":"integer"},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"integer"}},"required":["day","value"],"additionalProperties":false}}},"required":["count","prior","daily"],"additionalProperties":false}},"required":["activeUsers","visitsCreated","visitsCompleted","reportsGenerated"],"additionalProperties":false},"byUser":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"roleLabel":{"type":"string"},"logins":{"type":"integer"},"scoresEntered":{"type":"integer"},"scoresLocked":{"type":"integer"},"teamsFinalized":{"type":"integer"},"reportsGenerated":{"type":"integer"},"actions":{"type":"integer"},"lastActiveAt":{"type":"string","nullable":true}},"required":["userId","name","email","role","roleLabel","logins","scoresEntered","scoresLocked","teamsFinalized","reportsGenerated","actions","lastActiveAt"],"additionalProperties":false}},"topSchools":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"visitsCreated":{"type":"integer"},"visitsCompleted":{"type":"integer"},"reportsGenerated":{"type":"integer"},"total":{"type":"integer"}},"required":["schoolId","schoolName","visitsCreated","visitsCompleted","reportsGenerated","total"],"additionalProperties":false}},"inactive":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"roleLabel":{"type":"string"},"lastLoginAt":{"type":"string","nullable":true}},"required":["userId","name","email","roleLabel","lastLoginAt"],"additionalProperties":false}}},"required":["range","timezone","kpis","byUser","topSchools","inactive"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/usage/users/{userId}":{"get":{"summary":"One member’s IRW activity in a date range","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"roleLabel":{"type":"string"},"lastLoginAt":{"type":"string","nullable":true}},"required":["id","name","email","roleLabel","lastLoginAt"],"additionalProperties":false},"range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string","nullable":true},"details":{"type":"string"},"at":{"type":"string"},"ipAddress":{"type":"string","nullable":true}},"required":["id","action","entityType","details","at","ipAddress"],"additionalProperties":false}}},"required":["user","range","events"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/activity":{"get":{"summary":"IRW activity log (event log, Irw* events)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000},"in":"query","name":"page","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"category","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"dateFrom","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"dateTo","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"eventType":{"type":"string"},"category":{"type":"string"},"userName":{"type":"string","nullable":true},"userEmail":{"type":"string","nullable":true},"entityType":{"type":"string","nullable":true},"entityId":{"type":"string","nullable":true},"details":{"type":"string"},"occurredAt":{"type":"string"}},"required":["id","action","eventType","category","userName","userEmail","entityType","entityId","details","occurredAt"],"additionalProperties":false}},"categories":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["logs","categories","pagination"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/builder/meta":{"get":{"summary":"Report builder sources, dimensions, measures and rounds","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"label":{"type":"string"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","date","number"]}},"required":["key","label","type"],"additionalProperties":false}},"measures":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"],"additionalProperties":false}}},"required":["key","label","dimensions","measures"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"integer"}},"filterOps":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}}},"required":["sources","rounds","filterOps"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/builder/run":{"post":{"summary":"Run a report builder config","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false}},"required":["config"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"enum":["null"],"nullable":true}]}}},"rowDimensions":{"type":"array","items":{"type":"string"}},"columnDimensions":{"type":"array","items":{"type":"string"}},"measures":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string"},"rowCount":{"type":"integer"},"truncated":{"type":"boolean"}},"required":["source","rows","rowDimensions","columnDimensions","measures","generatedAt","rowCount","truncated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/builder/pdf":{"post":{"summary":"Report builder results as a PDF (binary)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"title":{"type":"string","maxLength":200}},"required":["config"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/irw/builder/email":{"post":{"summary":"Email report builder results (table + PDF; emits IrwReportEmailed)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"to":{"type":"string","minLength":3,"maxLength":4000},"subject":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":5000}},"required":["config","to"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sentTo":{"type":"integer"}},"required":["ok","sentTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/builder/saved":{"get":{"summary":"Your saved reports and the ones shared in this district","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerUserId":{"type":"string"},"ownerName":{"type":"string"},"isShared":{"type":"boolean"},"isMine":{"type":"boolean"},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","ownerUserId","ownerName","isShared","isMine","config","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Save a report (emits IrwSavedReportChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"isShared":{"type":"boolean","default":false}},"required":["name","config"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerUserId":{"type":"string"},"ownerName":{"type":"string"},"isShared":{"type":"boolean"},"isMine":{"type":"boolean"},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","ownerUserId","ownerName","isShared","isMine","config","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/builder/saved/{id}":{"get":{"summary":"One saved report","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerUserId":{"type":"string"},"ownerName":{"type":"string"},"isShared":{"type":"boolean"},"isMine":{"type":"boolean"},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","ownerUserId","ownerName","isShared","isMine","config","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename, re-share or update a saved report (owner)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"isShared":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerUserId":{"type":"string"},"ownerName":{"type":"string"},"isShared":{"type":"boolean"},"isMine":{"type":"boolean"},"config":{"type":"object","properties":{"source":{"type":"string","enum":["visits","teams","members","scores","teachers","classrooms","activity"]},"rows":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":6,"default":[]},"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":4,"default":[]},"measures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"op":{"type":"string","enum":["equals","in","gte","lte","contains","between"]},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}]}},"required":["field","op","value"],"additionalProperties":false},"maxItems":20,"default":[]},"dateFrom":{"type":"string","maxLength":10,"nullable":true},"dateTo":{"type":"string","maxLength":10,"nullable":true},"visitRound":{"type":"integer","minimum":1,"maximum":9,"nullable":true}},"required":["source"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","ownerUserId","ownerName","isShared","isMine","config","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a saved report (owner; soft)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/district":{"get":{"summary":"District, counts and academic years","tags":["Instructional Review Walkthroughs — public API"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"address":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"currentRound":{"type":"integer"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"_count":{"type":"object","properties":{"schools":{"type":"integer"},"users":{"type":"integer"},"visits":{"type":"integer"},"auditTemplates":{"type":"integer"}},"required":["schools","users","visits","auditTemplates"],"additionalProperties":false},"academicYears":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","label","startDate","endDate","isCurrent"],"additionalProperties":false}}},"required":["id","name","slug","address","city","state","zip","phone","email","currentRound","isActive","createdAt","_count","academicYears"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/schools":{"get":{"summary":"Schools with visit and teacher counts","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"_count":{"type":"object","properties":{"visits":{"type":"integer"},"teachers":{"type":"integer"}},"required":["visits","teachers"],"additionalProperties":false}},"required":["id","name","code","address","gradeLevel","isActive","_count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/visits":{"get":{"summary":"Visits (filters: status, academicYear label, round)","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"academicYear","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","IN_PROGRESS","UNDER_REVIEW","COMPLETED"]},"visitRound":{"type":"integer"},"visitDate":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"school":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true}},"required":["id","name","code"],"additionalProperties":false},"academicYear":{"type":"object","properties":{"label":{"type":"string"}},"required":["label"],"additionalProperties":false},"auditTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"_count":{"type":"object","properties":{"visitTeams":{"type":"integer"}},"required":["visitTeams"],"additionalProperties":false}},"required":["id","status","visitRound","visitDate","createdAt","updatedAt","school","academicYear","auditTemplate","_count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/visits/{id}/summary":{"get":{"summary":"One visit with its teams","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","IN_PROGRESS","UNDER_REVIEW","COMPLETED"]},"visitRound":{"type":"integer"},"visitDate":{"type":"string"},"createdAt":{"type":"string"},"school":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true}},"required":["id","name","code"],"additionalProperties":false},"academicYear":{"type":"object","properties":{"label":{"type":"string"}},"required":["label"],"additionalProperties":false},"auditTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"visitTeams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"percentageMet":{"type":"number","nullable":true},"lockedAt":{"type":"string","nullable":true},"isComplete":{"type":"boolean"},"teamTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"_count":{"type":"object","properties":{"members":{"type":"integer"},"scoringEntities":{"type":"integer"}},"required":["members","scoringEntities"],"additionalProperties":false}},"required":["id","percentageMet","lockedAt","isComplete","teamTemplate","_count"],"additionalProperties":false}},"_count":{"type":"object","properties":{"remediationFlags":{"type":"integer"}},"required":["remediationFlags"],"additionalProperties":false}},"required":["id","status","visitRound","visitDate","createdAt","school","academicYear","auditTemplate","visitTeams","_count"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/teams":{"get":{"summary":"Teams grouped by team template name","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"academicYear","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"templateName":{"type":"string"},"totalAssignments":{"type":"integer"},"lockedCount":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"totalMembers":{"type":"integer"},"visits":{"type":"array","items":{"type":"object","properties":{"visitId":{"type":"string"},"school":{"type":"string"},"status":{"type":"string","enum":["DRAFT","IN_PROGRESS","UNDER_REVIEW","COMPLETED"]},"percentageMet":{"type":"number","nullable":true},"isLocked":{"type":"boolean"}},"required":["visitId","school","status","percentageMet","isLocked"],"additionalProperties":false}}},"required":["templateName","totalAssignments","lockedCount","avgScore","totalMembers","visits"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/scores/summary":{"get":{"summary":"Score summary of completed visits","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"academicYear","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9},"in":"query","name":"round","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtAverage":{"type":"number","nullable":true},"totalCompletedVisits":{"type":"integer"},"teamSummaries":{"type":"array","items":{"type":"object","properties":{"teamName":{"type":"string"},"averageScore":{"type":"number","nullable":true},"totalAudits":{"type":"integer"},"highestScore":{"type":"number","nullable":true},"lowestScore":{"type":"number","nullable":true}},"required":["teamName","averageScore","totalAudits","highestScore","lowestScore"],"additionalProperties":false}},"schoolSummaries":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"averageScore":{"type":"number","nullable":true},"totalTeams":{"type":"integer"}},"required":["schoolId","schoolName","averageScore","totalTeams"],"additionalProperties":false}}},"required":["districtAverage","totalCompletedVisits","teamSummaries","schoolSummaries"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/remediation":{"get":{"summary":"Remediation flag counts, by school","tags":["Instructional Review Walkthroughs — public API"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"academicYear","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalFlags":{"type":"integer"},"totalFlagged":{"type":"integer"},"totalResolved":{"type":"integer"},"totalEscalated":{"type":"integer"},"bySchool":{"type":"array","items":{"type":"object","properties":{"schoolId":{"type":"string"},"schoolName":{"type":"string"},"flagged":{"type":"integer"},"resolved":{"type":"integer"},"escalated":{"type":"integer"},"total":{"type":"integer"}},"required":["schoolId","schoolName","flagged","resolved","escalated","total"],"additionalProperties":false}}},"required":["totalFlags","totalFlagged","totalResolved","totalEscalated","bySchool"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/api/reports/overview":{"get":{"summary":"District overview: visits by status, completion, average score, remediation","tags":["Instructional Review Walkthroughs — public API"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalVisits":{"type":"integer"},"visitsByStatus":{"type":"object","properties":{"draft":{"type":"integer"},"inProgress":{"type":"integer"},"underReview":{"type":"integer"},"completed":{"type":"integer"}},"required":["draft","inProgress","underReview","completed"],"additionalProperties":false},"completionRate":{"type":"number"},"averageScore":{"type":"number","nullable":true},"totalSchools":{"type":"integer"},"totalActiveUsers":{"type":"integer"},"totalTemplates":{"type":"integer"},"remediationSummary":{"type":"object","properties":{"totalFlags":{"type":"integer"},"resolvedFlags":{"type":"integer"},"resolutionRate":{"type":"number"}},"required":["totalFlags","resolvedFlags","resolutionRate"],"additionalProperties":false},"currentRound":{"type":"integer"}},"required":["totalVisits","visitsByStatus","completionRate","averageScore","totalSchools","totalActiveUsers","totalTemplates","remediationSummary","currentRound"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"},"district":{"type":"string"},"page":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["requestId","timestamp","district"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts":{"get":{"summary":"IRW alert center: recipients and their alert types","tags":["Instructional Review Walkthroughs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]},"label":{"type":"string"},"description":{"type":"string"},"subscribers":{"type":"integer"}},"required":["type","label","description","subscribers"],"additionalProperties":false}},"recipients":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"irwRole":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"roleLabel":{"type":"string"},"id":{"type":"string"},"isPaused":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]}},"problem":{"type":"string","nullable":true}},"required":["userId","name","email","irwRole","roleLabel","id","isPaused","subscriptions","problem"],"additionalProperties":false}},"eligible":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"irwRole":{"type":"string","enum":["TECH_ADMIN","TECH_MEMBER","DISTRICT_ADMIN","EXECUTIVE_LEADERSHIP","TEAM_LEAD","TEAM_MEMBER"]},"roleLabel":{"type":"string"}},"required":["userId","name","email","irwRole","roleLabel"],"additionalProperties":false}},"me":{"type":"object","properties":{"userId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"canTest":{"type":"boolean"}},"required":["userId","email","canTest"],"additionalProperties":false},"redirected":{"type":"boolean"},"isTrial":{"type":"boolean"},"digestHour":{"type":"integer"}},"required":["types","recipients","eligible","me","redirected","isTrial","digestHour"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/recipients":{"post":{"summary":"Add an alert recipient (emits IrwAlertRecipientChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64}},"required":["userId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/recipients/{id}":{"patch":{"summary":"Pause or resume a recipient (emits IrwAlertRecipientChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isPaused":{"type":"boolean"}},"required":["isPaused"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a recipient (emits IrwAlertRecipientChanged)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/recipients/{id}/subscriptions":{"put":{"summary":"Set a recipient’s alert types (emits IrwAlertRecipientChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertTypes":{"type":"array","items":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]},"maxItems":8}},"required":["alertTypes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/subscribe-all":{"post":{"summary":"Subscribe or unsubscribe every recipient to one alert type (emits IrwAlertRecipientChanged)","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]},"subscribed":{"type":"boolean"}},"required":["alertType","subscribed"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer"},"message":{"type":"string"}},"required":["count","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/test":{"post":{"summary":"Send a sample alert to yourself","tags":["Instructional Review Walkthroughs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]}},"required":["alertType"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"batchKey":{"type":"string"},"sent":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"message":{"type":"string"}},"required":["batchKey","sent","failed","skipped","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/alerts/log":{"get":{"summary":"IRW alert log, grouped by dispatch","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]},"in":"query","name":"type","required":false},{"schema":{"type":"string","enum":["sent","failed","skipped"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"batches":{"type":"array","items":{"type":"object","properties":{"batchKey":{"type":"string"},"alertType":{"type":"string","enum":["visit_completed","visit_started","team_completed","team_locked","critical_finding_escalated","report_generated","report_awaiting_approval","daily_digest"]},"label":{"type":"string"},"triggeredAt":{"type":"string"},"source":{"type":"object","properties":{"type":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"path":{"type":"string","nullable":true}},"required":["type","id","label","path"],"additionalProperties":false},"sent":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"recipientName":{"type":"string","nullable":true},"recipientEmail":{"type":"string","nullable":true},"status":{"type":"string","enum":["sent","failed","skipped"]},"errorMessage":{"type":"string","nullable":true}},"required":["recipientName","recipientEmail","status","errorMessage"],"additionalProperties":false}}},"required":["batchKey","alertType","label","triggeredAt","source","sent","failed","skipped","rows"],"additionalProperties":false}},"page":{"type":"integer"},"totalPages":{"type":"integer"},"totalBatches":{"type":"integer"},"totals":{"type":"object","properties":{"sent":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"}},"required":["sent","failed","skipped"],"additionalProperties":false},"oldest":{"type":"string","nullable":true}},"required":["batches","page","totalPages","totalBatches","totals","oldest"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Clear alert log entries older than N days (emits IrwAlertLogCleared)","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"integer","minimum":0,"maximum":3650},"in":"query","name":"olderThanDays","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer"},"message":{"type":"string"}},"required":["count","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/irw/calendar":{"get":{"summary":"IRW calendar: walkthrough visits and round milestones in a window","tags":["Instructional Review Walkthroughs"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"visits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"schoolId":{"type":"string"},"schoolName":{"type":"string"},"visitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"visitRound":{"type":"integer"},"status":{"type":"string","enum":["draft","in_progress","under_review","completed"]},"statusLabel":{"type":"string"},"yearName":{"type":"string"},"teamsTotal":{"type":"integer"},"teamsComplete":{"type":"integer"},"onMyTeam":{"type":"boolean"}},"required":["id","schoolId","schoolName","visitDate","visitRound","status","statusLabel","yearName","teamsTotal","teamsComplete","onMyTeam"],"additionalProperties":false}},"milestones":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kind":{"type":"string","enum":["year_start","year_end","round_window_start","round_window_end","review_closed"]},"label":{"type":"string"}},"required":["date","kind","label"],"additionalProperties":false}},"canSchedule":{"type":"boolean"}},"required":["from","to","visits","milestones","canSchedule"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/context":{"get":{"summary":"Omni Tutor: your role, menu and home","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"role":{"type":"string","enum":["ADMIN","MANAGER","TUTOR","PARENT"]},"roleLabel":{"type":"string"},"siteManager":{"type":"boolean"},"title":{"type":"string","nullable":true},"isPlatform":{"type":"boolean"},"isDemo":{"type":"boolean"},"userId":{"type":"string","nullable":true},"home":{"type":"string","enum":["admin","teach","portal"]},"menu":{"type":"object","additionalProperties":{"type":"boolean"}},"allowed":{"type":"object","additionalProperties":{"type":"boolean"}},"districtName":{"type":"string"},"isTrial":{"type":"boolean"},"programName":{"type":"string"},"profileId":{"type":"string","nullable":true},"familyStudentCount":{"type":"integer"},"student":{"type":"boolean"},"studentId":{"type":"string","nullable":true},"preview":{"type":"object","properties":{"kind":{"type":"string","enum":["tutor","family"]},"memberId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["TUTOR","PARENT"]},"startedAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["kind","memberId","name","role","startedAt","expiresAt"],"additionalProperties":false,"nullable":true},"canPreview":{"type":"boolean"}},"required":["role","roleLabel","siteManager","title","isPlatform","isDemo","userId","home","menu","allowed","districtName","isTrial","programName","profileId","familyStudentCount","student","studentId","preview","canPreview"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/menu":{"get":{"summary":"Omni Tutor: the sidebar items your role shows (null when you are not in the program)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menu":{"type":"object","additionalProperties":{"type":"boolean"},"nullable":true}},"required":["menu"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/tutoring/members":{"get":{"summary":"Omni Tutor members and their roles","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"personType":{"type":"string","nullable":true},"roleCodes":{"type":"array","items":{"type":"string"}},"tutorRole":{"type":"string","enum":["ADMIN","MANAGER","TUTOR","PARENT"]},"siteManager":{"type":"boolean"},"title":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"lastLoginAt":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true},"studentCount":{"type":"integer"}},"required":["memberId","userId","name","email","status","personType","roleCodes","tutorRole","siteManager","title","isActive","lastLoginAt","profileId","studentCount"],"additionalProperties":false}},"can":{"type":"object","properties":{"invite":{"type":"array","items":{"type":"string","enum":["ADMIN","MANAGER","TUTOR","PARENT"]}},"setRole":{"type":"boolean"},"setSiteManager":{"type":"boolean"},"deactivate":{"type":"boolean"}},"required":["invite","setRole","setSiteManager","deactivate"],"additionalProperties":false}},"required":["members","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an Omni Tutor member or change their role (emits TutorMemberChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"tutorRole":{"type":"string","enum":["ADMIN","MANAGER","TUTOR","PARENT"]},"title":{"type":"string","maxLength":120,"nullable":true}},"required":["userId","tutorRole"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/members/candidates":{"get":{"summary":"Find DEP users to add to Omni Tutor","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true},{"schema":{"type":"string","enum":["ADMIN","MANAGER","TUTOR","PARENT"]},"in":"query","name":"role","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"roleCodes":{"type":"array","items":{"type":"string"}},"personType":{"type":"string","nullable":true},"jobTitle":{"type":"string","nullable":true}},"required":["userId","name","email","roleCodes","personType","jobTitle"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/members/{id}/site-manager":{"patch":{"summary":"Grant or remove Site manager (ADMIN only; emits TutorMemberChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteManager":{"type":"boolean"}},"required":["siteManager"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/members/{id}/active":{"patch":{"summary":"Deactivate or reactivate a member (ADMIN only; emits TutorMemberChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/settings":{"get":{"summary":"Omni Tutor program settings","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"programName":{"type":"string"},"timezone":{"type":"string"},"defaultSessionMinutes":{"type":"integer"},"lateCancelHours":{"type":"integer"},"defaultStipendRate":{"type":"number"},"familyBookingEnabled":{"type":"boolean"},"requireBackgroundCheck":{"type":"boolean"},"supportEmail":{"type":"string","nullable":true},"welcomeMessage":{"type":"string","nullable":true}},"required":["programName","timezone","defaultSessionMinutes","lateCancelHours","defaultStipendRate","familyBookingEnabled","requireBackgroundCheck","supportEmail","welcomeMessage"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Change program settings (program admin; emits TutorSettingsUpdated)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"programName":{"type":"string","minLength":2,"maxLength":200},"timezone":{"type":"string","minLength":3,"maxLength":60},"defaultSessionMinutes":{"type":"integer","minimum":15,"maximum":180},"lateCancelHours":{"type":"integer","minimum":0,"maximum":168},"defaultStipendRate":{"type":"number","minimum":0,"maximum":1000},"familyBookingEnabled":{"type":"boolean"},"requireBackgroundCheck":{"type":"boolean"},"supportEmail":{"type":"string","format":"email","maxLength":200,"nullable":true},"welcomeMessage":{"type":"string","maxLength":4000,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"programName":{"type":"string"},"timezone":{"type":"string"},"defaultSessionMinutes":{"type":"integer"},"lateCancelHours":{"type":"integer"},"defaultStipendRate":{"type":"number"},"familyBookingEnabled":{"type":"boolean"},"requireBackgroundCheck":{"type":"boolean"},"supportEmail":{"type":"string","nullable":true},"welcomeMessage":{"type":"string","nullable":true}},"required":["programName","timezone","defaultSessionMinutes","lateCancelHours","defaultStipendRate","familyBookingEnabled","requireBackgroundCheck","supportEmail","welcomeMessage"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/dashboard/admin":{"get":{"summary":"Program overview (Omni Tutor /admin)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"families":{"type":"integer"},"activeFamilies":{"type":"integer"},"activeTutors":{"type":"integer"},"openInquiries":{"type":"integer"},"sessionsThisWeek":{"type":"integer"},"today":{"type":"integer"},"students":{"type":"integer"},"pendingApplications":{"type":"integer"},"documentsToReview":{"type":"integer"},"timesheetsToApprove":{"type":"integer"}},"required":["families","activeFamilies","activeTutors","openInquiries","sessionsThisWeek","today","students","pendingApplications","documentsToReview","timesheetsToApprove"],"additionalProperties":false},"recentInquiries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"studentName":{"type":"string"},"studentGrade":{"type":"string"},"subjects":{"type":"string"},"status":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"createdAt":{"type":"string"}},"required":["id","parentName","studentName","studentGrade","subjects","status","createdAt"],"additionalProperties":false}},"todaySessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"studentName":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"}},"required":["id","startsAt","endsAt","status","studentName","subjectName","tutorName"],"additionalProperties":false}},"trend":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"sessions":{"type":"integer"},"families":{"type":"integer"}},"required":["label","sessions","families"],"additionalProperties":false},"nullable":true}},"required":["stats","recentInquiries","todaySessions","trend"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/dashboard/teach":{"get":{"summary":"Tutor hub (Omni Tutor /teach)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"firstName":{"type":"string"},"hasProfile":{"type":"boolean"},"setup":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"hint":{"type":"string"},"done":{"type":"boolean"},"screen":{"type":"string"}},"required":["key","label","hint","done","screen"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"cta":{"type":"string"},"screen":{"type":"string"},"id":{"type":"string","nullable":true},"urgent":{"type":"boolean"}},"required":["label","cta","screen","id","urgent"],"additionalProperties":false}},"upcoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"studentName":{"type":"string"},"subjectName":{"type":"string"}},"required":["id","startsAt","endsAt","status","studentName","subjectName"],"additionalProperties":false}},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"subjects":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"string"}}},"required":["id","name","gradeLevel","subjects","flags"],"additionalProperties":false}},"counts":{"type":"object","properties":{"students":{"type":"integer"},"upcoming":{"type":"integer"},"pendingRequests":{"type":"integer"},"homeworkToReview":{"type":"integer"}},"required":["students","upcoming","pendingRequests","homeworkToReview"],"additionalProperties":false}},"required":["firstName","hasProfile","setup","actions","upcoming","students","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/dashboard/portal":{"get":{"summary":"Family home (Omni Tutor /portal)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"firstName":{"type":"string"},"familyName":{"type":"string","nullable":true},"familyStatus":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"],"nullable":true},"guardianOfStudents":{"type":"integer"},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"pronouns":{"type":"string","nullable":true},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"studentName":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"}},"required":["id","startsAt","endsAt","status","studentName","subjectName","tutorName"],"additionalProperties":false}},"plan":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"progressPct":{"type":"integer"},"status":{"type":"string","enum":["in_progress","achieved","on_hold"]},"subjectName":{"type":"string"}},"required":["id","description","progressPct","status","subjectName"],"additionalProperties":false}}},"required":["id","title","goals"],"additionalProperties":false,"nullable":true},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"periodLabel":{"type":"string"},"summary":{"type":"string"},"publishedAt":{"type":"string"},"tutorName":{"type":"string"}},"required":["id","periodLabel","summary","publishedAt","tutorName"],"additionalProperties":false}},"homework":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"dueAt":{"type":"string","nullable":true},"tutorName":{"type":"string"}},"required":["id","title","dueAt","tutorName"],"additionalProperties":false}}},"required":["id","name","gradeLevel","pronouns","sessions","plan","reports","homework"],"additionalProperties":false}},"nextSession":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"studentName":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"}},"required":["id","startsAt","endsAt","status","studentName","subjectName","tutorName"],"additionalProperties":false,"nullable":true},"toReview":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"studentName":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"},"startsAt":{"type":"string"}},"required":["sessionId","studentName","subjectName","tutorName","startsAt"],"additionalProperties":false}},"hours":{"type":"object","properties":{"sessionsTotal":{"type":"integer"},"sessionsUsed":{"type":"integer"}},"required":["sessionsTotal","sessionsUsed"],"additionalProperties":false}},"required":["firstName","familyName","familyStatus","guardianOfStudents","students","nextSession","toReview","hours"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/subjects":{"get":{"summary":"Tutoring subjects","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["reading","writing","math","homework_help","academic_skills"]},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"tutorCount":{"type":"integer"}},"required":["id","name","category","description","isActive","tutorCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/methodologies":{"get":{"summary":"Teaching methodologies","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"category":{"type":"string","enum":["reading","writing","math","executive_function","general"]},"description":{"type":"string","nullable":true}},"required":["id","name","shortName","category","description"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/skills":{"get":{"summary":"Skills framework","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string"},"in":"query","name":"grade","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"code":{"type":"string"},"strand":{"type":"string"},"name":{"type":"string"},"gradeBand":{"type":"string"},"gradeNum":{"type":"integer"},"difficulty":{"type":"number"},"prerequisiteIds":{"type":"array","items":{"type":"string"}}},"required":["id","subjectId","code","strand","name","gradeBand","gradeNum","difficulty","prerequisiteIds"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors":{"get":{"summary":"Tutor directory","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string"},"in":"query","name":"methodologyId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeInactive","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"tutorType":{"type":"string","enum":["staff","contracted"]},"isActive":{"type":"boolean"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"methodologies":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"},"activeStudents":{"type":"integer"},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]}},"required":["id","personId","name","headline","photoUrl","yearsExp","tutorType","isActive","subjects","methodologies","rating","reviewCount","activeStudents","backgroundCheckStatus"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors/{id}":{"get":{"summary":"One tutor","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"tutorType":{"type":"string","enum":["staff","contracted"]},"isActive":{"type":"boolean"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"methodologies":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"},"activeStudents":{"type":"integer"},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]},"bio":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"stipendRate":{"type":"number","nullable":true},"stipendMethod":{"type":"string","enum":["payroll","stipend","contract_invoice"],"nullable":true},"weeklyHours":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer"},"startMin":{"type":"integer"},"endMin":{"type":"integer"}},"required":["dayOfWeek","startMin","endMin"],"additionalProperties":false}}},"required":["id","personId","name","headline","photoUrl","yearsExp","tutorType","isActive","subjects","methodologies","rating","reviewCount","activeStudents","backgroundCheckStatus","bio","credentials","stipendRate","stipendMethod","weeklyHours"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors/me":{"get":{"summary":"Your tutor profile","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"tutorType":{"type":"string","enum":["staff","contracted"]},"isActive":{"type":"boolean"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"photoUrl":{"type":"string","nullable":true},"photoUploaded":{"type":"boolean"},"subjectIds":{"type":"array","items":{"type":"string"}},"methodologyIds":{"type":"array","items":{"type":"string"}},"stipendRate":{"type":"number"},"stipendMethod":{"type":"string","enum":["payroll","stipend","contract_invoice"],"nullable":true},"payrollRef":{"type":"string","nullable":true},"stipendSetupAt":{"type":"string","nullable":true},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]},"backgroundCheckCompletedAt":{"type":"string","nullable":true},"backgroundCheckExpiresAt":{"type":"string","nullable":true}},"required":["id","personId","name","email","tutorType","isActive","headline","bio","credentials","yearsExp","photoUrl","photoUploaded","subjectIds","methodologyIds","stipendRate","stipendMethod","payrollRef","stipendSetupAt","backgroundCheckStatus","backgroundCheckCompletedAt","backgroundCheckExpiresAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save your tutor profile","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headline":{"type":"string","maxLength":200,"nullable":true},"bio":{"type":"string","maxLength":8000,"nullable":true},"credentials":{"type":"string","maxLength":4000,"nullable":true},"photoUrl":{"type":"string","maxLength":500,"nullable":true},"yearsExp":{"type":"integer","minimum":0,"maximum":60},"subjectIds":{"type":"array","items":{"type":"string"},"maxItems":40},"methodologyIds":{"type":"array","items":{"type":"string"},"maxItems":40}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors/me/photo":{"post":{"summary":"Use an uploaded image as your profile photo","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"storageKey":{"type":"string","minLength":10,"maxLength":500}},"required":["storageKey"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove your profile photo","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors/me/stipend":{"put":{"summary":"Stipend setup: how the district pays you","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stipendMethod":{"type":"string","enum":["payroll","stipend","contract_invoice"]},"payrollRef":{"type":"string","maxLength":60,"nullable":true}},"required":["stipendMethod"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/tutors/{id}/photo":{"get":{"summary":"A tutor’s uploaded profile photo (any program member)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tutoring/availability":{"get":{"summary":"Weekly hours and exceptions","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"profileId":{"type":"string","nullable":true},"weekly":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dayOfWeek":{"type":"integer"},"startMin":{"type":"integer"},"endMin":{"type":"integer"}},"required":["id","dayOfWeek","startMin","endMin"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"kind":{"type":"string","enum":["blocked","extra"]},"startMin":{"type":"integer"},"endMin":{"type":"integer"},"reason":{"type":"string","nullable":true}},"required":["id","date","kind","startMin","endMin","reason"],"additionalProperties":false}}},"required":["profileId","weekly","exceptions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/availability/blocks":{"post":{"summary":"Add weekly hours (TutorAvailabilityChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"startMin":{"type":"integer","minimum":0,"maximum":1440},"endMin":{"type":"integer","minimum":1,"maximum":1440}},"required":["dayOfWeek","startMin","endMin"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/availability/days/{day}":{"put":{"summary":"Replace one weekday’s hours (TutorAvailabilityChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"blocks":{"type":"array","items":{"type":"object","properties":{"startMin":{"type":"integer","minimum":0,"maximum":1440},"endMin":{"type":"integer","minimum":1,"maximum":1440}},"required":["startMin","endMin"],"additionalProperties":false},"maxItems":12}},"required":["blocks"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"integer","minimum":0,"maximum":6},"in":"path","name":"day","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/availability/blocks/{id}":{"delete":{"summary":"Remove weekly hours (TutorAvailabilityChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/availability/exceptions":{"post":{"summary":"Add a one-day exception or calendar event (TutorAvailabilityChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kind":{"type":"string","enum":["blocked","extra"]},"startMin":{"type":"integer","minimum":0,"maximum":1440},"endMin":{"type":"integer","minimum":1,"maximum":1440},"reason":{"type":"string","maxLength":300,"nullable":true},"via":{"type":"string","enum":["availability","calendar"],"default":"availability"}},"required":["date","kind","startMin","endMin"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/availability/exceptions/{id}":{"delete":{"summary":"Remove a one-day exception or calendar event (TutorAvailabilityChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/uploads/{area}":{"post":{"summary":"Upload a file for a document, library resource or session prep (multipart \"file\")","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","enum":["tutor-docs","library","session-prep","data-exports"]},"in":"path","name":"area","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"storageKey":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"}},"required":["storageKey","fileName","mimeType","sizeBytes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/files/{area}/{id}":{"get":{"summary":"Open an Omni Tutor file (who may: lib/file-access canOpenUpload)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"download","required":false},{"schema":{"type":"string","enum":["tutor-docs","library","session-prep"]},"in":"path","name":"area","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tutoring/documents":{"get":{"summary":"Tutor verification documents","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","enum":["pending","approved","rejected"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"kind":{"type":"string","enum":["id","degree","certification","background_check","other"]},"title":{"type":"string"},"fileName":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewNotes":{"type":"string","nullable":true},"uploadedAt":{"type":"string"},"reviewedAt":{"type":"string","nullable":true}},"required":["id","profileId","tutorName","kind","title","fileName","status","reviewNotes","uploadedAt","reviewedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a verification document (upload the file first)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["id","degree","certification","background_check","other"]},"title":{"type":"string","minLength":2,"maxLength":200},"storageKey":{"type":"string","maxLength":500},"fileName":{"type":"string","maxLength":255,"nullable":true},"mimeType":{"type":"string","maxLength":120,"nullable":true},"sizeBytes":{"type":"integer","minimum":0}},"required":["kind","title","storageKey"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/documents/{id}":{"delete":{"summary":"Remove your document while it waits for review","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/families":{"get":{"summary":"Program families","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"timezone":{"type":"string"},"studentCount":{"type":"integer"},"guardians":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"}},"required":["personId","name"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","name","status","timezone","studentCount","guardians","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/students":{"get":{"summary":"Program students (scoped to your role)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentPersonId":{"type":"string"},"familyId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"isActive":{"type":"boolean"},"subjects":{"type":"array","items":{"type":"string"}},"tutors":{"type":"array","items":{"type":"string"}},"hasSupportProfile":{"type":"boolean"}},"required":["id","studentPersonId","familyId","name","gradeLevel","isActive","subjects","tutors","hasSupportProfile"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/teach/students":{"get":{"summary":"Your students (tutor workspace)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"subjects":{"type":"array","items":{"type":"string"}},"guardian":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"relationship":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["personId","name","relationship","email","phone"],"additionalProperties":false,"nullable":true},"currentPlanTitle":{"type":"string","nullable":true},"supportPlanType":{"type":"string","enum":["none","iep","plan_504","rti","gifted"],"nullable":true},"hasSupportPlan":{"type":"boolean"},"iepStatus":{"type":"string","nullable":true}},"required":["id","name","gradeLevel","familyId","familyName","subjects","guardian","currentPlanTitle","supportPlanType","hasSupportPlan","iepStatus"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/teach/students/{id}":{"get":{"summary":"One of your students (tutor workspace)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"studentPersonId":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"gradeLevel":{"type":"string"},"pronouns":{"type":"string","nullable":true},"interests":{"type":"string","nullable":true},"goals":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"family":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"timezone":{"type":"string"}},"required":["id","name","status","timezone"],"additionalProperties":false},"guardians":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"relationship":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["personId","name","relationship","email","phone"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"enrollmentId":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"source":{"type":"string","enum":["admin_match","request"]},"isActive":{"type":"boolean"},"startedAt":{"type":"string"}},"required":["enrollmentId","subjectId","subjectName","source","isActive","startedAt"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"summary":{"type":"string","nullable":true},"recommendedLevel":{"type":"string","nullable":true},"administeredAt":{"type":"string","nullable":true}},"required":["id","subjectName","status","summary","recommendedLevel","administeredAt"],"additionalProperties":false}},"administrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"purpose":{"type":"string","enum":["baseline","probe","unit"]},"milestoneLabel":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"completedAt":{"type":"string","nullable":true}},"required":["id","title","purpose","milestoneLabel","scorePct","completedAt"],"additionalProperties":false}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"title":{"type":"string"},"overview":{"type":"string"},"createdAt":{"type":"string"},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"description":{"type":"string"},"measure":{"type":"string"},"targetDate":{"type":"string","nullable":true},"progressPct":{"type":"integer"},"status":{"type":"string","enum":["in_progress","achieved","on_hold"]}},"required":["id","subjectId","subjectName","description","measure","targetDate","progressPct","status"],"additionalProperties":false}}},"required":["id","studentId","title","overview","createdAt","goals"],"additionalProperties":false}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"startsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"hasNote":{"type":"boolean"}},"required":["id","subjectName","startsAt","status","hasNote"],"additionalProperties":false}},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"periodLabel":{"type":"string"},"publishedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","periodLabel","publishedAt","createdAt"],"additionalProperties":false}},"practice":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lessonTitle":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete","abandoned"]},"completedSegments":{"type":"integer"},"totalSegments":{"type":"integer"},"startedAt":{"type":"string"},"durationSec":{"type":"integer"},"strugglesFlagged":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true}},"required":["id","lessonTitle","subjectName","status","completedSegments","totalSegments","startedAt","durationSec","strugglesFlagged","summary"],"additionalProperties":false}},"support":{"type":"object","properties":{"hasProfile":{"type":"boolean"},"planType":{"type":"string","enum":["none","iep","plan_504","rti","gifted"]},"categories":{"type":"array","items":{"type":"string"}},"primaryConcern":{"type":"string","nullable":true},"accommodationCount":{"type":"integer"},"goalCount":{"type":"integer"},"iepStatus":{"type":"string","nullable":true}},"required":["hasProfile","planType","categories","primaryConcern","accommodationCount","goalCount","iepStatus"],"additionalProperties":false},"externalAssessments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceName":{"type":"string"},"name":{"type":"string"},"subjectLabel":{"type":"string","nullable":true},"administeredOn":{"type":"string","nullable":true},"overallScore":{"type":"number","nullable":true},"overallLevel":{"type":"string","nullable":true},"percentile":{"type":"integer","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"standardCode":{"type":"string"},"standardLabel":{"type":"string","nullable":true},"sourceLevel":{"type":"string","nullable":true},"normalizedScore":{"type":"number","nullable":true},"skillName":{"type":"string","nullable":true}},"required":["id","standardCode","standardLabel","sourceLevel","normalizedScore","skillName"],"additionalProperties":false}}},"required":["id","sourceName","name","subjectLabel","administeredOn","overallScore","overallLevel","percentile","results"],"additionalProperties":false}},"focusAreas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"standardCode":{"type":"string"},"standardLabel":{"type":"string","nullable":true},"normalizedScore":{"type":"number","nullable":true},"skillName":{"type":"string","nullable":true},"assessmentName":{"type":"string"},"sourceName":{"type":"string"}},"required":["id","standardCode","standardLabel","normalizedScore","skillName","assessmentName","sourceName"],"additionalProperties":false}},"stateTests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assessmentType":{"type":"string"},"testYear":{"type":"integer"},"subject":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"scaleScore":{"type":"integer","nullable":true},"performanceLevel":{"type":"integer","nullable":true},"performanceLabel":{"type":"string","nullable":true},"percentileRank":{"type":"integer","nullable":true}},"required":["id","assessmentType","testYear","subject","gradeLevel","scaleScore","performanceLevel","performanceLabel","percentileRank"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"}},"required":["id","code","name","strand","subjectId","subjectName"],"additionalProperties":false}}},"required":["id","studentPersonId","name","firstName","gradeLevel","pronouns","interests","goals","isActive","family","guardians","subjects","diagnostics","administrations","plans","sessions","reports","practice","support","externalAssessments","focusAreas","stateTests","skills"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/teach/students/{id}/notes":{"patch":{"summary":"Edit a student’s interests and goals (emits TutorStudentChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interests":{"type":"string","maxLength":4000,"nullable":true},"goals":{"type":"string","maxLength":4000,"nullable":true}},"required":["interests","goals"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/inquiries":{"get":{"summary":"Requests for tutoring","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"parentEmail":{"type":"string"},"studentName":{"type":"string"},"studentGrade":{"type":"string"},"subjects":{"type":"string"},"status":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"source":{"type":"string","enum":["in_app","staff_referral","campaign","family_referral"]},"familyId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","parentName","parentEmail","studentName","studentGrade","subjects","status","source","familyId","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Ask the program for tutoring (TutorInquiryChanged; program staff are told in the app)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentName":{"type":"string","minLength":2,"maxLength":200},"parentEmail":{"type":"string","format":"email","maxLength":200},"parentPhone":{"type":"string","maxLength":40,"nullable":true},"studentName":{"type":"string","minLength":1,"maxLength":200},"studentGrade":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"subjects":{"type":"array","items":{"type":"string","maxLength":120},"minItems":1,"maxItems":10},"goals":{"type":"string","minLength":10,"maxLength":4000},"preferredTimes":{"type":"string","maxLength":1000,"nullable":true},"studentPersonId":{"type":"string","maxLength":64,"nullable":true},"referralCode":{"type":"string","maxLength":40,"nullable":true}},"required":["parentName","parentEmail","studentName","studentGrade","subjects","goals"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/requests":{"get":{"summary":"Family requests for a specific tutor","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["pending","accepted","declined","canceled"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"studentId":{"type":"string","nullable":true},"studentName":{"type":"string","nullable":true},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","accepted","declined","canceled"]},"createdAt":{"type":"string"},"decidedAt":{"type":"string","nullable":true},"studentGrade":{"type":"string","nullable":true},"declineReason":{"type":"string","nullable":true}},"required":["id","familyId","familyName","profileId","tutorName","studentId","studentName","subjectId","subjectName","message","status","createdAt","decidedAt","studentGrade","declineReason"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/requests/{id}/decision":{"post":{"summary":"Accept or decline a family’s request (emits TutorRequestChanged, TutorMatchChanged, TutorFamilyChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["accept","decline"]},"declineReason":{"type":"string","maxLength":2000,"nullable":true}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","accepted","declined","canceled"]},"enrollmentId":{"type":"string","nullable":true},"enrollmentCreated":{"type":"boolean"},"familyStatus":{"type":"string"},"notified":{"type":"integer"}},"required":["status","enrollmentId","enrollmentCreated","familyStatus","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/apply":{"get":{"summary":"The tutor application form (Omni Tutor /apply)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"prefill":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","nullable":true},"pronouns":{"type":"string","nullable":true}},"required":["fullName","email","phone","pronouns"],"additionalProperties":false},"subjects":{"type":"array","items":{"type":"string"}},"methodologies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string","enum":["reading","writing","math","executive_function","general"]}},"required":["name","category"],"additionalProperties":false}},"open":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","createdAt"],"additionalProperties":false,"nullable":true}},"required":["prefill","subjects","methodologies","open"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/applications":{"post":{"summary":"Apply to tutor for the program (TutorApplicationChanged submitted)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string","minLength":2,"maxLength":200},"email":{"type":"string","format":"email","maxLength":200},"phone":{"type":"string","maxLength":40,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"pronouns":{"type":"string","maxLength":30,"nullable":true},"highestDegree":{"type":"string","minLength":2,"maxLength":300},"yearsTeaching":{"type":"integer","minimum":0,"maximum":60},"teachingTypes":{"type":"array","items":{"type":"string","enum":["classroom","tutoring","ta","specialist","after_school","online"]},"minItems":1},"subjects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":20},"gradeLevels":{"type":"array","items":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"minItems":1},"credentials":{"type":"string","maxLength":4000,"nullable":true},"methodologies":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":40,"default":[]},"sampleWorkUrl":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri","maxLength":500,"nullable":true}]},{"type":"string","enum":[""]}]},"whyApply":{"type":"string","minLength":20,"maxLength":6000},"ref1Name":{"type":"string","minLength":2,"maxLength":200},"ref1Role":{"type":"string","minLength":2,"maxLength":200},"ref1Email":{"type":"string","format":"email","maxLength":200},"ref2Name":{"type":"string","maxLength":200,"nullable":true},"ref2Role":{"type":"string","maxLength":200,"nullable":true},"ref2Email":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"email","maxLength":200,"nullable":true}]},{"type":"string","enum":[""]}]},"backgroundConsent":{"type":"boolean","enum":[true]}},"required":["fullName","email","highestDegree","yearsTeaching","teachingTypes","subjects","gradeLevels","whyApply","ref1Name","ref1Role","ref1Email","backgroundConsent"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"Tutor applications","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked","approved","declined"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"subjects":{"type":"string"},"gradeLevels":{"type":"string"},"yearsTeaching":{"type":"integer"},"status":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked","approved","declined"]},"createdAt":{"type":"string"},"decisionAt":{"type":"string","nullable":true}},"required":["id","fullName","email","subjects","gradeLevels","yearsTeaching","status","createdAt","decisionAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/enrollments":{"get":{"summary":"Student–tutor matches","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"active","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"isActive":{"type":"boolean"},"source":{"type":"string","enum":["admin_match","request"]},"startedAt":{"type":"string"},"endedAt":{"type":"string","nullable":true}},"required":["id","studentId","studentName","profileId","tutorName","subjectId","subjectName","isActive","source","startedAt","endedAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions":{"get":{"summary":"Tutoring sessions","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"string","enum":["upcoming","past"]},"in":"query","name":"when","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"location":{"type":"string","enum":["online","in_person"]},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"seriesId":{"type":"string","nullable":true},"videoMeetingId":{"type":"string","nullable":true},"hasNote":{"type":"boolean"},"hasReview":{"type":"boolean"},"lateCancel":{"type":"boolean"}},"required":["id","startsAt","endsAt","status","location","studentId","studentName","profileId","tutorName","subjectId","subjectName","seriesId","videoMeetingId","hasNote","hasReview","lateCancel"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Schedule a session or a weekly series with one of your students (TutorSessionScheduled)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enrollmentId":{"type":"string","minLength":1},"startsAt":{"type":"string","minLength":1},"durationMinutes":{"type":"integer","minimum":15,"maximum":180},"location":{"type":"string","enum":["online","in_person"],"default":"online"},"repeatWeeks":{"type":"integer","minimum":1,"maximum":12,"default":1}},"required":["enrollmentId","startsAt"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sessionIds":{"type":"array","items":{"type":"string"}},"created":{"type":"integer"},"seriesId":{"type":"string","nullable":true},"skipped":{"type":"array","items":{"type":"object","properties":{"when":{"type":"string"},"reason":{"type":"string"}},"required":["when","reason"],"additionalProperties":false}}},"required":["sessionIds","created","seriesId","skipped"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/slots":{"get":{"summary":"Open booking slots of a tutor","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"profileId","required":true},{"schema":{"type":"string"},"in":"query","name":"from","required":true},{"schema":{"type":"integer","minimum":1,"maximum":31,"default":14},"in":"query","name":"days","required":false},{"schema":{"type":"integer","minimum":15,"maximum":180,"default":50},"in":"query","name":"durationMinutes","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"dayLabel":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string"},"endsAt":{"type":"string"},"time":{"type":"string"}},"required":["startsAt","endsAt","time"],"additionalProperties":false}}},"required":["date","dayLabel","slots"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/schedule-options":{"get":{"summary":"The tutor’s active matches for scheduling","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"enrollmentId":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"}},"required":["enrollmentId","studentId","studentName","subjectId","subjectName"],"additionalProperties":false}},"defaultSessionMinutes":{"type":"integer"},"maxRecurringWeeks":{"type":"integer"},"lateCancelHours":{"type":"integer"},"timezone":{"type":"string"}},"required":["matches","defaultSessionMinutes","maxRecurringWeeks","lateCancelHours","timezone"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/instant":{"post":{"summary":"Start a session right now with one of your students (TutorSessionScheduled)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enrollmentId":{"type":"string"},"studentId":{"type":"string"},"durationMinutes":{"type":"integer","minimum":15,"maximum":180}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}":{"get":{"summary":"A session room: call window, materials, live answers, prep, notes","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"location":{"type":"string","enum":["online","in_person"]},"seriesId":{"type":"string","nullable":true},"laterInSeries":{"type":"integer"},"lateCancel":{"type":"boolean"},"cancelReason":{"type":"string","nullable":true},"canceledAt":{"type":"string","nullable":true},"rescheduleCount":{"type":"integer"},"previousStartsAt":{"type":"string","nullable":true},"recordingUrl":{"type":"string","nullable":true},"videoMeetingId":{"type":"string","nullable":true},"subject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"student":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"gradeLevel":{"type":"string"},"goals":{"type":"string","nullable":true}},"required":["id","name","firstName","gradeLevel","goals"],"additionalProperties":false},"profileId":{"type":"string"},"tutorName":{"type":"string"},"viewer":{"type":"string","enum":["TUTOR","STUDENT","OBSERVER"]},"flags":{"type":"object","properties":{"closed":{"type":"boolean"},"isPast":{"type":"boolean"},"isLive":{"type":"boolean"},"canJoin":{"type":"boolean"},"canStart":{"type":"boolean"},"canEnd":{"type":"boolean"},"canNoShow":{"type":"boolean"},"canReschedule":{"type":"boolean"},"canCancel":{"type":"boolean"},"canReportUnavailable":{"type":"boolean"},"cancelWouldBeLate":{"type":"boolean"},"lateCancelHours":{"type":"integer"}},"required":["closed","isPast","isLive","canJoin","canStart","canEnd","canNoShow","canReschedule","canCancel","canReportUnavailable","cancelWouldBeLate","lateCancelHours"],"additionalProperties":false},"callWindow":{"type":"object","properties":{"opens":{"type":"string"},"closes":{"type":"string"}},"required":["opens","closes"],"additionalProperties":false},"note":{"type":"object","properties":{"summary":{"type":"string"},"worksOn":{"type":"string"},"homework":{"type":"string","nullable":true},"privateNote":{"type":"string","nullable":true},"updatedAt":{"type":"string"}},"required":["summary","worksOn","homework","privateNote","updatedAt"],"additionalProperties":false,"nullable":true},"materials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"kind":{"type":"string","enum":["lesson","resource"]},"lesson":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string"},"agenda":{"type":"string","nullable":true},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string"},"prompt":{"type":"string","nullable":true},"hasSkill":{"type":"boolean"}},"required":["id","sortOrder","kind","title","prompt","hasSkill"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"url":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"hasFile":{"type":"boolean"}},"required":["id","title","kind","url","content","hasFile"],"additionalProperties":false}}},"required":["id","title","objective","agenda","segments","resources"],"additionalProperties":false,"nullable":true},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"url":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"hasFile":{"type":"boolean"}},"required":["id","title","kind","url","content","hasFile"],"additionalProperties":false,"nullable":true}},"required":["id","sortOrder","kind","lesson","resource"],"additionalProperties":false}},"responses":{"type":"array","items":{"type":"object","properties":{"segmentId":{"type":"string"},"questionText":{"type":"string"},"studentAnswer":{"type":"string"},"status":{"type":"string","enum":["pending","correct","needs_work"]},"tutorFeedback":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"updatedAt":{"type":"string"}},"required":["segmentId","questionText","studentAnswer","status","tutorFeedback","sortOrder","updatedAt"],"additionalProperties":false}},"preps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"},"fileName":{"type":"string","nullable":true},"hasFile":{"type":"boolean"},"createdAt":{"type":"string"},"tutorViewedAt":{"type":"string","nullable":true}},"required":["id","note","fileName","hasFile","createdAt","tutorViewedAt"],"additionalProperties":false}},"unavailableReported":{"type":"boolean"},"hours":{"type":"object","properties":{"hourEntryId":{"type":"string","nullable":true},"minutes":{"type":"integer","nullable":true},"drawStatus":{"type":"string","enum":["drawn","unfunded","returned"],"nullable":true}},"required":["hourEntryId","minutes","drawStatus"],"additionalProperties":false,"nullable":true}},"required":["id","startsAt","endsAt","status","location","seriesId","laterInSeries","lateCancel","cancelReason","canceledAt","rescheduleCount","previousStartsAt","recordingUrl","videoMeetingId","subject","student","profileId","tutorName","viewer","flags","callWindow","note","materials","responses","preps","unavailableReported","hours"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/room":{"post":{"summary":"Join the session’s DEP video call (a short-lived token for the caller)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"domain":{"type":"string"},"room":{"type":"string"},"token":{"type":"string"},"displayName":{"type":"string"},"title":{"type":"string"},"expiresInSeconds":{"type":"integer"},"moderator":{"type":"boolean"}},"required":["domain","room","token","displayName","title","expiresInSeconds","moderator"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/status":{"post":{"summary":"Start, end or mark a session no-show (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["start","end","no_show"]}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/report-unavailable":{"post":{"summary":"Tell program staff you cannot make this session (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/notes":{"put":{"summary":"Save session notes; a finished session is completed and its hours settled (TutorSessionNoteSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":8000},"worksOn":{"type":"string","minLength":1,"maxLength":8000},"homework":{"type":"string","maxLength":8000,"nullable":true},"privateNote":{"type":"string","maxLength":8000,"nullable":true}},"required":["summary","worksOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"completed":{"type":"boolean"},"hourEntryId":{"type":"string","nullable":true},"drawStatus":{"type":"string","enum":["drawn","unfunded","returned"],"nullable":true}},"required":["completed","hourEntryId","drawStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/material-options":{"get":{"summary":"Lessons and resources you can attach to this session","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lessons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"isStarter":{"type":"boolean"},"forStudent":{"type":"boolean"},"segmentCount":{"type":"integer"}},"required":["id","title","objective","gradeMin","gradeMax","isStarter","forStudent","segmentCount"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"}},"required":["id","title","kind","gradeMin","gradeMax"],"additionalProperties":false}}},"required":["lessons","resources"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/materials":{"post":{"summary":"Attach a lesson or resource (TutorSessionMaterialsChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lessonId":{"type":"string","nullable":true},"resourceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/materials/{materialId}":{"delete":{"summary":"Remove an attached lesson or resource (TutorSessionMaterialsChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"materialId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/reschedule":{"post":{"summary":"Move this session, or it and the rest of its series (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string"},"durationMinutes":{"type":"integer","minimum":15,"maximum":180},"scope":{"type":"string","enum":["one","series"],"default":"one"},"reason":{"type":"string","maxLength":2000,"nullable":true}},"required":["startsAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"moved":{"type":"integer"}},"required":["moved"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/cancel":{"post":{"summary":"Cancel this session or the rest of its series; late if inside the program’s late-cancel window (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000,"nullable":true},"scope":{"type":"string","enum":["one","series"],"default":"one"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"late":{"type":"boolean"},"canceled":{"type":"integer"}},"required":["late","canceled"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/prep/viewed":{"post":{"summary":"Mark the family’s session prep as seen by the tutor","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/answers":{"get":{"summary":"Live answers for the session workspace (polled by both sides)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"segmentId":{"type":"string"},"questionText":{"type":"string"},"studentAnswer":{"type":"string"},"status":{"type":"string","enum":["pending","correct","needs_work"]},"tutorFeedback":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"updatedAt":{"type":"string"}},"required":["segmentId","questionText","studentAnswer","status","tutorFeedback","sortOrder","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"The student’s answer to a live question (family; TutorSessionAnswerSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"segmentId":{"type":"string"},"questionText":{"type":"string","maxLength":4000},"answer":{"type":"string","maxLength":8000},"order":{"type":"integer"}},"required":["segmentId","questionText","answer"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/sessions/{id}/answers/mark":{"put":{"summary":"Mark a live answer; a segment with a skill feeds mastery (TutorSessionAnswerSaved, TutorMasteryRecorded)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"segmentId":{"type":"string"},"status":{"type":"string","enum":["pending","correct","needs_work"]},"feedback":{"type":"string","maxLength":4000,"nullable":true},"questionText":{"type":"string","maxLength":4000,"default":""},"order":{"type":"integer"}},"required":["segmentId","status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-templates":{"get":{"summary":"Diagnostic templates","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string","enum":["baseline","probe","unit"]},"in":"query","name":"purpose","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"purpose":{"type":"string","enum":["baseline","probe","unit"]},"questionCount":{"type":"integer"},"shared":{"type":"boolean"},"mine":{"type":"boolean"},"administrations":{"type":"integer"},"description":{"type":"string"},"sectionCount":{"type":"integer"}},"required":["id","title","subjectId","subjectName","gradeMin","gradeMax","purpose","questionCount","shared","mine","administrations"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a diagnostic template","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":8000},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"purpose":{"type":"string","enum":["baseline","probe","unit"],"default":"baseline"},"questions":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":120},"questionType":{"type":"string","enum":["multiple_choice","short_answer","numeric","read_aloud","rubric"]},"prompt":{"type":"string","minLength":1,"maxLength":8000},"options":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":12},"correctAnswer":{"type":"string","maxLength":2000,"nullable":true},"skillTag":{"type":"string","maxLength":120,"nullable":true},"skillId":{"type":"string","nullable":true},"points":{"type":"integer","minimum":0,"maximum":20,"default":1}},"required":["section","questionType","prompt"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["title","description","subjectId","gradeMin","gradeMax"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-templates/{id}":{"get":{"summary":"One diagnostic template with its questions","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"purpose":{"type":"string","enum":["baseline","probe","unit"]},"mine":{"type":"boolean"},"shared":{"type":"boolean"},"authorName":{"type":"string","nullable":true},"canEdit":{"type":"boolean"},"administrations":{"type":"integer"},"canDelete":{"type":"boolean"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"section":{"type":"string"},"sortOrder":{"type":"integer"},"questionType":{"type":"string","enum":["multiple_choice","short_answer","numeric","read_aloud","rubric"]},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"correctAnswer":{"type":"string","nullable":true},"skillTag":{"type":"string","nullable":true},"skillId":{"type":"string","nullable":true},"skillName":{"type":"string","nullable":true},"points":{"type":"integer"}},"required":["id","section","sortOrder","questionType","prompt","options","correctAnswer","skillTag","skillId","skillName","points"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"gradeBand":{"type":"string"}},"required":["id","code","name","strand","gradeBand"],"additionalProperties":false}}},"required":["id","title","description","subjectId","subjectName","gradeMin","gradeMax","purpose","mine","shared","authorName","canEdit","administrations","canDelete","questions","skills"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Edit a diagnostic template","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":8000},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"purpose":{"type":"string","enum":["baseline","probe","unit"],"default":"baseline"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a template that was never administered","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-templates/{id}/questions":{"post":{"summary":"Add a question","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":120},"questionType":{"type":"string","enum":["multiple_choice","short_answer","numeric","read_aloud","rubric"]},"prompt":{"type":"string","minLength":1,"maxLength":8000},"options":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":12},"correctAnswer":{"type":"string","maxLength":2000,"nullable":true},"skillTag":{"type":"string","maxLength":120,"nullable":true},"skillId":{"type":"string","nullable":true},"points":{"type":"integer","minimum":0,"maximum":20,"default":1}},"required":["section","questionType","prompt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-templates/{id}/order":{"put":{"summary":"Reorder questions","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}},"required":["questionIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-questions/{id}":{"put":{"summary":"Edit a question","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":120},"questionType":{"type":"string","enum":["multiple_choice","short_answer","numeric","read_aloud","rubric"]},"prompt":{"type":"string","minLength":1,"maxLength":8000},"options":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":12},"correctAnswer":{"type":"string","maxLength":2000,"nullable":true},"skillTag":{"type":"string","maxLength":120,"nullable":true},"skillId":{"type":"string","nullable":true},"points":{"type":"integer","minimum":0,"maximum":20,"default":1}},"required":["section","questionType","prompt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a question","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-administrations":{"get":{"summary":"Diagnostic runs","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["in_progress","complete"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"templateTitle":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete"]},"purpose":{"type":"string","enum":["baseline","probe","unit"]},"milestoneLabel":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","templateId","templateTitle","studentId","studentName","profileId","status","purpose","milestoneLabel","scorePct","startedAt","completedAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start (or resume) a diagnostic run for one of your students","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string"},"studentId":{"type":"string"},"sessionId":{"type":"string","nullable":true},"milestoneLabel":{"type":"string","maxLength":120,"nullable":true},"purpose":{"type":"string","enum":["baseline","probe","unit"]}},"required":["templateId","studentId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"resumed":{"type":"boolean"},"diagnosticId":{"type":"string"}},"required":["id","resumed","diagnosticId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-administrations/{id}":{"get":{"summary":"One diagnostic run (runner or result)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete"]},"purpose":{"type":"string","enum":["baseline","probe","unit"]},"milestoneLabel":{"type":"string","nullable":true},"scorePct":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"templateId":{"type":"string"},"templateTitle":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"profileId":{"type":"string"},"sessionId":{"type":"string","nullable":true},"sessionStartsAt":{"type":"string","nullable":true},"diagnostic":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"summary":{"type":"string","nullable":true},"strengths":{"type":"string","nullable":true},"growthAreas":{"type":"string","nullable":true},"recommendedLevel":{"type":"string","nullable":true}},"required":["id","status","summary","strengths","growthAreas","recommendedLevel"],"additionalProperties":false,"nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"section":{"type":"string"},"sortOrder":{"type":"integer"},"questionType":{"type":"string","enum":["multiple_choice","short_answer","numeric","read_aloud","rubric"]},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"correctAnswer":{"type":"string","nullable":true},"skillTag":{"type":"string","nullable":true},"skillId":{"type":"string","nullable":true},"skillName":{"type":"string","nullable":true},"points":{"type":"integer"}},"required":["id","section","sortOrder","questionType","prompt","options","correctAnswer","skillTag","skillId","skillName","points"],"additionalProperties":false}},"responses":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"answer":{"type":"string","nullable":true},"correct":{"type":"boolean","nullable":true},"rubricScore":{"type":"integer","nullable":true},"tutorNote":{"type":"string","nullable":true}},"required":["questionId","answer","correct","rubricScore","tutorNote"],"additionalProperties":false}},"earned":{"type":"number"},"possible":{"type":"number"},"runningPct":{"type":"number"},"answered":{"type":"integer"},"suggested":{"type":"object","properties":{"strengths":{"type":"string"},"growthAreas":{"type":"string"}},"required":["strengths","growthAreas"],"additionalProperties":false},"canAdminister":{"type":"boolean"},"masteryEvents":{"type":"integer"}},"required":["id","status","purpose","milestoneLabel","scorePct","notes","startedAt","completedAt","templateId","templateTitle","subjectId","subjectName","studentId","studentName","gradeLevel","profileId","sessionId","sessionStartsAt","diagnostic","questions","responses","earned","possible","runningPct","answered","suggested","canAdminister","masteryEvents"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-administrations/{id}/responses":{"put":{"summary":"Record one answer in a run","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string"},"answer":{"type":"string","maxLength":8000,"nullable":true},"correct":{"type":"boolean","nullable":true},"rubricScore":{"type":"integer","minimum":0,"maximum":20,"nullable":true},"tutorNote":{"type":"string","maxLength":4000,"nullable":true}},"required":["questionId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostic-administrations/{id}/complete":{"post":{"summary":"Complete a run: score it, write the summary, feed mastery","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","maxLength":8000,"nullable":true},"strengths":{"type":"string","maxLength":8000,"nullable":true},"growthAreas":{"type":"string","maxLength":8000,"nullable":true},"recommendedLevel":{"type":"string","maxLength":100,"nullable":true},"notes":{"type":"string","maxLength":8000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"scorePct":{"type":"number"},"skillsUpdated":{"type":"integer"}},"required":["id","scorePct","skillsUpdated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/diagnostics":{"get":{"summary":"Diagnostic summaries","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["in_progress","complete"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"administeredAt":{"type":"string","nullable":true},"recommendedLevel":{"type":"string","nullable":true}},"required":["id","studentId","subjectName","status","administeredAt","recommendedLevel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/learning-plans":{"get":{"summary":"Learning plans","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"title":{"type":"string"},"overview":{"type":"string"},"createdAt":{"type":"string"},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"description":{"type":"string"},"measure":{"type":"string"},"targetDate":{"type":"string","nullable":true},"progressPct":{"type":"integer"},"status":{"type":"string","enum":["in_progress","achieved","on_hold"]}},"required":["id","subjectId","subjectName","description","measure","targetDate","progressPct","status"],"additionalProperties":false}}},"required":["id","studentId","title","overview","createdAt","goals"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a learning plan (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string"},"title":{"type":"string","minLength":2,"maxLength":200},"overview":{"type":"string","maxLength":8000}},"required":["studentId","title","overview"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/learning-plans/{id}":{"patch":{"summary":"Edit a learning plan (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"overview":{"type":"string","maxLength":8000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a learning plan (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/learning-plans/{id}/goals":{"post":{"summary":"Add a goal to a plan (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"description":{"type":"string","minLength":2,"maxLength":4000},"measure":{"type":"string","minLength":2,"maxLength":4000},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["subjectId","description","measure"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/learning-goals/{id}":{"put":{"summary":"Edit a goal (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"description":{"type":"string","minLength":2,"maxLength":4000},"measure":{"type":"string","minLength":2,"maxLength":4000},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["subjectId","description","measure"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a goal’s progress and status (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"progressPct":{"type":"integer","minimum":0,"maximum":100},"status":{"type":"string","enum":["in_progress","achieved","on_hold"]}},"required":["progressPct"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a goal (emits TutorLearningPlanChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/resources":{"get":{"summary":"Resource library","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"in":"query","name":"grade","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mine","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"skillTags":{"type":"array","items":{"type":"string"}},"isStarter":{"type":"boolean"},"mine":{"type":"boolean"},"hasFile":{"type":"boolean"},"url":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"required":["id","title","kind","subjectId","subjectName","gradeMin","gradeMax","skillTags","isStarter","mine","hasFile","url"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a library resource (emits TutorResourceChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"skillTags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30,"default":[]},"url":{"type":"string","maxLength":1000,"nullable":true},"storageKey":{"type":"string","maxLength":500,"nullable":true},"content":{"type":"string","maxLength":200000,"nullable":true}},"required":["title","kind","subjectId","gradeMin","gradeMax"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/resources/{id}":{"get":{"summary":"A library resource","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"skillTags":{"type":"array","items":{"type":"string"}},"url":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"hasFile":{"type":"boolean"},"fileType":{"type":"string","nullable":true},"isStarter":{"type":"boolean"},"mine":{"type":"boolean"},"authorName":{"type":"string","nullable":true},"usedIn":{"type":"object","properties":{"lessons":{"type":"integer"},"homework":{"type":"integer"},"sessions":{"type":"integer"}},"required":["lessons","homework","sessions"],"additionalProperties":false},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"delete":{"type":"boolean"}},"required":["edit","delete"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","kind","subjectId","subjectName","gradeMin","gradeMax","skillTags","url","content","hasFile","fileType","isStarter","mine","authorName","usedIn","can","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a library resource (own unless program admin/manager; emits TutorResourceChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"skillTags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30,"default":[]},"url":{"type":"string","maxLength":1000,"nullable":true},"storageKey":{"type":"string","maxLength":500,"nullable":true},"content":{"type":"string","maxLength":200000,"nullable":true}},"required":["title","kind","subjectId","gradeMin","gradeMax"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a library resource (own unless program admin/manager; emits TutorResourceChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/resources/import":{"post":{"summary":"Preview or import library resources from a CSV (emits TutorResourceChanged on commit)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":2000000},"commit":{"type":"boolean","default":false}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"validCount":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"title":{"type":"string"},"error":{"type":"string"}},"required":["row","title","error"],"additionalProperties":false}},"sample":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subject":{"type":"string"},"grades":{"type":"string"}},"required":["title","kind","subject","grades"],"additionalProperties":false}},"imported":{"type":"integer"},"skipped":{"type":"integer"}},"required":["total","validCount","errors","sample"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons":{"get":{"summary":"Lesson plans","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false},{"schema":{"type":"string","enum":["manual","starter","ai_generated"]},"in":"query","name":"source","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"durationMinutes":{"type":"integer"},"source":{"type":"string","enum":["manual","starter","ai_generated"]},"isStarter":{"type":"boolean"},"studentId":{"type":"string","nullable":true},"studentName":{"type":"string","nullable":true},"authorProfileId":{"type":"string","nullable":true},"segmentCount":{"type":"integer"},"createdAt":{"type":"string"},"objective":{"type":"string"},"resourceCount":{"type":"integer"},"mine":{"type":"boolean"}},"required":["id","title","subjectId","subjectName","gradeMin","gradeMax","durationMinutes","source","isStarter","studentId","studentName","authorProfileId","segmentCount","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Write a lesson plan (teach/lessons/new; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"objective":{"type":"string","minLength":2,"maxLength":8000},"agenda":{"type":"string","minLength":2,"maxLength":100000},"durationMinutes":{"type":"integer","minimum":10,"maximum":240,"default":50},"resourceIds":{"type":"array","items":{"type":"string"},"maxItems":100,"default":[]}},"required":["title","subjectId","gradeMin","gradeMax","objective","agenda"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/options":{"get":{"summary":"What the lesson screens pick from (own students, subjects, methods, skills, library)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"}},"required":["id","name","gradeLevel"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"taught":{"type":"boolean"},"skillCount":{"type":"integer"}},"required":["id","name","category","taught","skillCount"],"additionalProperties":false}},"methods":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"summary":{"type":"string"},"source":{"type":"string","enum":["catalogue","program"]}},"required":["key","name","category","summary","source"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"subjectId":{"type":"string"},"gradeNum":{"type":"integer"}},"required":["id","code","name","strand","subjectId","gradeNum"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"}},"required":["id","title","kind","subjectId","subjectName","gradeMin","gradeMax"],"additionalProperties":false}}},"required":["students","subjects","methods","skills","resources"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/build":{"post":{"summary":"Build a lesson with AI (tutoring:lesson-builder:v1; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","nullable":true},"subjectId":{"type":"string"},"topic":{"type":"string","minLength":2,"maxLength":300},"durationMinutes":{"type":"integer","minimum":15,"maximum":180,"default":50},"methodKeys":{"type":"array","items":{"type":"string"},"maxItems":10},"methodologyIds":{"type":"array","items":{"type":"string"},"maxItems":10},"standardSkillIds":{"type":"array","items":{"type":"string"},"maxItems":40},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"extraNotes":{"type":"string","maxLength":2000,"nullable":true}},"required":["subjectId","topic"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string","nullable":true},"segmentCount":{"type":"integer"}},"required":["id","studentId","segmentCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}":{"get":{"summary":"A lesson plan with its segments and resources","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"durationMinutes":{"type":"integer"},"objective":{"type":"string"},"agenda":{"type":"string"},"source":{"type":"string","enum":["manual","starter","ai_generated"]},"isStarter":{"type":"boolean"},"topic":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true},"studentName":{"type":"string","nullable":true},"authorProfileId":{"type":"string","nullable":true},"authorName":{"type":"string","nullable":true},"ai":{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string"}},"standards":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}},"accommodations":{"type":"array","items":{"type":"string"}},"rationale":{"type":"string","nullable":true},"differentiation":{"type":"string","nullable":true},"specialEdNotes":{"type":"string","nullable":true},"materialsPlan":{"type":"string","nullable":true},"assessmentPlan":{"type":"string","nullable":true},"homeworkSuggestion":{"type":"string","nullable":true}},"required":["methods","standards","accommodations","rationale","differentiation","specialEdNotes","materialsPlan","assessmentPlan","homeworkSuggestion"],"additionalProperties":false,"nullable":true},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string"},"narration":{"type":"string"},"checkpointPrompt":{"type":"string","nullable":true},"practicePrompt":{"type":"string","nullable":true},"practiceAnswer":{"type":"string","nullable":true},"skillId":{"type":"string","nullable":true},"skillCode":{"type":"string","nullable":true},"skillName":{"type":"string","nullable":true},"audioUrl":{"type":"string","nullable":true}},"required":["id","sortOrder","kind","title","narration","checkpointPrompt","practicePrompt","practiceAnswer","skillId","skillCode","skillName","audioUrl"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"}},"required":["id","title","kind","subjectName","gradeMin","gradeMax"],"additionalProperties":false}},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"editSegments":{"type":"boolean"},"assign":{"type":"boolean"},"delete":{"type":"boolean"}},"required":["edit","editSegments","assign","delete"],"additionalProperties":false},"practiceCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","subjectId","subjectName","gradeMin","gradeMax","durationMinutes","objective","agenda","source","isStarter","topic","studentId","studentName","authorProfileId","authorName","ai","segments","resources","can","practiceCount","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a lesson (title, objective, agenda, grades, duration; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"objective":{"type":"string","minLength":2,"maxLength":8000},"agenda":{"type":"string","minLength":2,"maxLength":100000},"durationMinutes":{"type":"integer","minimum":10,"maximum":240,"default":50}},"required":["title","gradeMin","gradeMax","objective","agenda"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a lesson (refused once a student has practised it; emits TutorLessonChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/student":{"put":{"summary":"Assign the plan to one of your students, or clear it to a reusable starter (emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","nullable":true}},"required":["studentId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/resources":{"post":{"summary":"Attach a library resource (emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resourceId":{"type":"string"}},"required":["resourceId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/resources/{resourceId}":{"delete":{"summary":"Detach a library resource (emits TutorLessonChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"resourceId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/segments":{"post":{"summary":"Add a segment (emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string","minLength":1,"maxLength":200},"narration":{"type":"string","maxLength":50000},"checkpointPrompt":{"type":"string","maxLength":4000,"nullable":true},"practicePrompt":{"type":"string","maxLength":4000,"nullable":true},"practiceAnswer":{"type":"string","maxLength":4000,"nullable":true},"skillId":{"type":"string","nullable":true}},"required":["kind","title","narration"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/segments/order":{"put":{"summary":"Reorder the segments (every live segment id, in the new order; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"segmentIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}},"required":["segmentIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/lessons/{id}/segments/{segmentId}":{"patch":{"summary":"Edit a segment (kind, narration, prompts, measured skill; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string","minLength":1,"maxLength":200},"narration":{"type":"string","maxLength":50000},"checkpointPrompt":{"type":"string","maxLength":4000,"nullable":true},"practicePrompt":{"type":"string","maxLength":4000,"nullable":true},"practiceAnswer":{"type":"string","maxLength":4000,"nullable":true},"skillId":{"type":"string","nullable":true}},"required":["kind","title","narration"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"segmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a segment (emits TutorLessonChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"segmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework":{"get":{"summary":"Homework","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["assigned","submitted","complete"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"status":{"type":"string","enum":["assigned","submitted","complete"]},"dueAt":{"type":"string","nullable":true},"questionCount":{"type":"integer"},"markedCount":{"type":"integer"},"createdAt":{"type":"string"},"instructions":{"type":"string"},"resourceTitles":{"type":"array","items":{"type":"string"}}},"required":["id","title","studentId","studentName","profileId","tutorName","status","dueAt","questionCount","markedCount","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Assign homework to one of your students","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string"},"sessionId":{"type":"string","nullable":true},"title":{"type":"string","minLength":2,"maxLength":200},"instructions":{"type":"string","minLength":2,"maxLength":20000},"dueAt":{"type":"string","nullable":true},"resourceIds":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[]},"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"skillId":{"type":"string","nullable":true}},"required":["prompt"],"additionalProperties":false},"maxItems":50,"default":[]}},"required":["studentId","title","instructions"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/options":{"get":{"summary":"What the new-homework form offers: your students, their sessions, library resources in your subjects, skills","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"}},"required":["id","name","gradeLevel"],"additionalProperties":false}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"startsAt":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string"}},"required":["id","studentId","startsAt","subjectName","status"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"}},"required":["id","title","kind","subjectId","subjectName"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"}},"required":["id","code","name","subjectId","subjectName"],"additionalProperties":false}}},"required":["students","sessions","resources","skills"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/{id}":{"get":{"summary":"One homework assignment with its questions and answers","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"status":{"type":"string","enum":["assigned","submitted","complete"]},"dueAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"submittedAt":{"type":"string","nullable":true},"submittedNote":{"type":"string","nullable":true},"studentId":{"type":"string"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"sessionId":{"type":"string","nullable":true},"sessionStartsAt":{"type":"string","nullable":true},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"subjectName":{"type":"string"},"hasFile":{"type":"boolean"},"url":{"type":"string","nullable":true}},"required":["id","title","kind","subjectName","hasFile","url"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"prompt":{"type":"string"},"skillId":{"type":"string","nullable":true},"skillCode":{"type":"string","nullable":true},"skillName":{"type":"string","nullable":true},"studentAnswer":{"type":"string"},"status":{"type":"string","enum":["pending","correct","needs_work"]},"tutorFeedback":{"type":"string","nullable":true},"masteryRecorded":{"type":"boolean"}},"required":["id","sortOrder","prompt","skillId","skillCode","skillName","studentAnswer","status","tutorFeedback","masteryRecorded"],"additionalProperties":false}},"role":{"type":"string","enum":["tutor","family","staff"]},"canMark":{"type":"boolean"},"canAnswer":{"type":"boolean"},"canSetStatus":{"type":"boolean"},"canDelete":{"type":"boolean"}},"required":["id","title","instructions","status","dueAt","createdAt","submittedAt","submittedNote","studentId","studentName","gradeLevel","profileId","tutorName","sessionId","sessionStartsAt","resources","questions","role","canMark","canAnswer","canSetStatus","canDelete"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete homework that has not been turned in","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/{id}/mark":{"put":{"summary":"Mark one answer (correct / needs work / not marked) with feedback","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string"},"status":{"type":"string","enum":["pending","correct","needs_work"]},"feedback":{"type":"string","maxLength":4000,"nullable":true}},"required":["questionId","status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/{id}/status":{"patch":{"summary":"Mark homework complete, or reopen it for the family","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete","assigned"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/{id}/answer":{"put":{"summary":"The family saves an answer (while the homework is assigned)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string"},"answer":{"type":"string","maxLength":8000}},"required":["questionId","answer"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/homework/{id}/submit":{"post":{"summary":"The family turns the homework in","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":8000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/practice-sessions":{"get":{"summary":"AI practice sessions","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["in_progress","complete","abandoned"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lessonId":{"type":"string"},"lessonTitle":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete","abandoned"]},"completedSegments":{"type":"integer"},"totalSegments":{"type":"integer"},"durationSec":{"type":"integer"},"strugglesFlagged":{"type":"string","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","lessonId","lessonTitle","studentId","studentName","status","completedSegments","totalSegments","durationSec","strugglesFlagged","startedAt","completedAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/practice-sessions/{id}":{"get":{"summary":"One AI practice session with its transcript","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"lessonId":{"type":"string"},"lessonTitle":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete","abandoned"]},"completedSegments":{"type":"integer"},"totalSegments":{"type":"integer"},"durationSec":{"type":"integer"},"strugglesFlagged":{"type":"string","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"subjectName":{"type":"string"},"summary":{"type":"string","nullable":true},"gradeLevel":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string"}},"required":["id","sortOrder","kind","title"],"additionalProperties":false}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"segmentId":{"type":"string","nullable":true},"role":{"type":"string","enum":["student","ai","system"]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","segmentId","role","body","createdAt"],"additionalProperties":false}}},"required":["id","lessonId","lessonTitle","studentId","studentName","status","completedSegments","totalSegments","durationSec","strugglesFlagged","startedAt","completedAt","subjectName","summary","gradeLevel","segments","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/students/{studentId}/mastery":{"get":{"summary":"A student’s skill mastery","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentId":{"type":"string"},"skills":{"type":"array","items":{"type":"object","properties":{"skillId":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"subjectId":{"type":"string"},"masteryPct":{"type":"integer"},"status":{"type":"string","enum":["not_assessed","emerging","developing","proficient","mastered"]},"attempts":{"type":"integer"},"correct":{"type":"integer"},"theta":{"type":"number"},"baselineTheta":{"type":"number","nullable":true},"lastEventAt":{"type":"string","nullable":true}},"required":["skillId","code","name","strand","subjectId","masteryPct","status","attempts","correct","theta","baselineTheta","lastEventAt"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"skillId":{"type":"string"},"source":{"type":"string","enum":["diagnostic","probe","practice","checkpoint","homework","manual","import"]},"correct":{"type":"boolean","nullable":true},"masteryPctAfter":{"type":"integer"},"delta":{"type":"number"},"milestoneLabel":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","skillId","source","correct","masteryPctAfter","delta","milestoneLabel","createdAt"],"additionalProperties":false}}},"required":["studentId","skills","recent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Record a tutor’s observation of a skill (emits TutorMasteryRecorded)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"skillId":{"type":"string"},"correct":{"type":"boolean"},"weight":{"type":"number","minimum":0.1,"maximum":3,"default":1},"note":{"type":"string","maxLength":500,"nullable":true}},"required":["skillId","correct"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"skillId":{"type":"string"},"masteryPctBefore":{"type":"integer"},"masteryPctAfter":{"type":"integer"},"status":{"type":"string","enum":["not_assessed","emerging","developing","proficient","mastered"]}},"required":["skillId","masteryPctBefore","masteryPctAfter","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/students/{studentId}/mastery/profile":{"get":{"summary":"A student’s skill profile, subject rollup and growth curve","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentId":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"skillId":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeNum":{"type":"integer"},"difficulty":{"type":"number"},"theta":{"type":"number"},"masteryPct":{"type":"integer"},"status":{"type":"string","enum":["not_assessed","emerging","developing","proficient","mastered"]},"attempts":{"type":"integer"},"correct":{"type":"integer"},"gradeEquivalent":{"type":"number"},"gradeEquivalentLabel":{"type":"string"},"percentile":{"type":"number"},"baselinePct":{"type":"number","nullable":true},"gainPct":{"type":"number","nullable":true},"lastEventAt":{"type":"string","nullable":true}},"required":["skillId","code","name","strand","subjectId","subjectName","gradeNum","difficulty","theta","masteryPct","status","attempts","correct","gradeEquivalent","gradeEquivalentLabel","percentile","baselinePct","gainPct","lastEventAt"],"additionalProperties":false}},"rollups":{"type":"array","items":{"type":"object","properties":{"subjectId":{"type":"string"},"subjectName":{"type":"string"},"skillsAssessed":{"type":"integer"},"avgMasteryPct":{"type":"number"},"avgGradeEquivalent":{"type":"number"},"avgGradeEquivalentLabel":{"type":"string"},"percentile":{"type":"number"},"baselineAvgPct":{"type":"number","nullable":true},"gainPct":{"type":"number","nullable":true}},"required":["subjectId","subjectName","skillsAssessed","avgMasteryPct","avgGradeEquivalent","avgGradeEquivalentLabel","percentile","baselineAvgPct","gainPct"],"additionalProperties":false}},"growth":{"type":"array","items":{"type":"object","properties":{"subjectId":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"source":{"type":"string","enum":["diagnostic","probe","practice","checkpoint","homework","manual","import"]},"skillId":{"type":"string"},"skillName":{"type":"string"},"masteryPctAfter":{"type":"number"},"delta":{"type":"number"},"milestoneLabel":{"type":"string","nullable":true}},"required":["at","source","skillId","skillName","masteryPctAfter","delta","milestoneLabel"],"additionalProperties":false}}},"required":["subjectId","points"],"additionalProperties":false}}},"required":["studentId","rows","rollups","growth"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessments":{"get":{"summary":"Assessment data sources and imports","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"layout":{"type":"string","enum":["long","wide"]},"studentMatch":{"type":"string","enum":["name","external_id","local_id"]},"isActive":{"type":"boolean"},"batchCount":{"type":"integer"},"columnMap":{"type":"object","additionalProperties":{"type":"string"}},"standardCols":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","maxLength":300}},"required":["header","code"],"additionalProperties":false}},"levelMap":{"type":"object","additionalProperties":{"type":"number"}}},"required":["id","name","description","layout","studentMatch","isActive","batchCount"],"additionalProperties":false}},"batches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"sourceName":{"type":"string"},"fileName":{"type":"string","nullable":true},"rowCount":{"type":"integer"},"importedCount":{"type":"integer"},"matchedStudents":{"type":"integer"},"skippedRows":{"type":"integer"},"seededMastery":{"type":"boolean"},"status":{"type":"string","enum":["complete","reverted"]},"createdAt":{"type":"string"},"notes":{"type":"string","nullable":true},"createdByName":{"type":"string","nullable":true}},"required":["id","sourceId","sourceName","fileName","rowCount","importedCount","matchedStudents","skippedRows","seededMastery","status","createdAt"],"additionalProperties":false}}},"required":["sources","batches"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessments/inspect":{"post":{"summary":"Read an uploaded CSV: headers, sample rows, distinct values per column","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":5000000}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"headers":{"type":"array","items":{"type":"string"}},"sample":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"distinct":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"rowCount":{"type":"integer"}},"required":["headers","sample","distinct","rowCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessment-sources":{"post":{"summary":"Save a new assessment source and its column mapping (emits TutorAssessmentImport)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"layout":{"type":"string","enum":["long","wide"]},"studentMatch":{"type":"string","enum":["name","external_id","local_id"]},"columnMap":{"type":"object","additionalProperties":{"type":"string"}},"standardCols":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","maxLength":300}},"required":["header","code"],"additionalProperties":false},"maxItems":500},"levelMap":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"isActive":{"type":"boolean","default":true}},"required":["name","layout","studentMatch","columnMap","levelMap"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessment-sources/{id}":{"put":{"summary":"Edit an assessment source’s mapping (emits TutorAssessmentImport)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"layout":{"type":"string","enum":["long","wide"]},"studentMatch":{"type":"string","enum":["name","external_id","local_id"]},"columnMap":{"type":"object","additionalProperties":{"type":"string"}},"standardCols":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","maxLength":300}},"required":["header","code"],"additionalProperties":false},"maxItems":500},"levelMap":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"isActive":{"type":"boolean","default":true}},"required":["name","layout","studentMatch","columnMap","levelMap"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an assessment source and its mapping; imported data stays (emits TutorAssessmentImport)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessments/import":{"post":{"summary":"Preview (commit=false) or commit an assessment import (emits TutorAssessmentImport on commit)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string"},"fileName":{"type":"string","maxLength":255},"csv":{"type":"string","minLength":1,"maxLength":5000000},"seedMastery":{"type":"boolean","default":true},"commit":{"type":"boolean","default":false},"assessmentName":{"type":"string","maxLength":200}},"required":["sourceId","csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"preview":{"type":"object","properties":{"rowCount":{"type":"integer"},"matchedStudents":{"type":"integer"},"unmatched":{"type":"array","items":{"type":"string"}},"unmatchedCount":{"type":"integer"},"unmappedLevels":{"type":"array","items":{"type":"string"}},"standardsTotal":{"type":"integer"},"standardsMappedToSkill":{"type":"integer"},"unmappedStandards":{"type":"array","items":{"type":"string"}},"unmappedStandardsCount":{"type":"integer"},"sample":{"type":"array","items":{"type":"object","properties":{"studentLabel":{"type":"string"},"matched":{"type":"boolean"},"name":{"type":"string"},"resultCount":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"level":{"type":"string"},"score":{"type":"number","nullable":true},"mapped":{"type":"boolean"}},"required":["code","level","score","mapped"],"additionalProperties":false}}},"required":["studentLabel","matched","name","resultCount","results"],"additionalProperties":false}}},"required":["rowCount","matchedStudents","unmatched","unmatchedCount","unmappedLevels","standardsTotal","standardsMappedToSkill","unmappedStandards","unmappedStandardsCount","sample"],"additionalProperties":false},"result":{"type":"object","properties":{"batchId":{"type":"string"},"imported":{"type":"integer"},"matched":{"type":"integer"},"skipped":{"type":"integer"},"seeded":{"type":"integer"}},"required":["batchId","imported","matched","skipped","seeded"],"additionalProperties":false}},"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/assessment-batches/{id}/revert":{"post":{"summary":"Undo an import: removes its assessments; mastery history stays (emits TutorAssessmentImport)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"removed":{"type":"integer"},"message":{"type":"string"}},"required":["ok","removed","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/progress-reports":{"get":{"summary":"Progress reports","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"studentId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"published","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"periodLabel":{"type":"string"},"published":{"type":"boolean"},"publishedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","studentId","studentName","profileId","tutorName","periodLabel","published","publishedAt","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Save a report draft, or save and publish (notifies the family; emits TutorProgressReportChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string"},"periodLabel":{"type":"string","minLength":2,"maxLength":120},"summary":{"type":"string","minLength":2,"maxLength":20000},"highlights":{"type":"string","maxLength":20000},"focusNext":{"type":"string","maxLength":20000},"publish":{"type":"boolean","default":false}},"required":["studentId","periodLabel","summary","highlights","focusNext"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"published":{"type":"boolean"},"notified":{"type":"integer"}},"required":["id","published","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/progress-reports/options":{"get":{"summary":"Students a tutor can write reports for","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"}},"required":["id","name","gradeLevel"],"additionalProperties":false}}},"required":["students"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/progress-reports/draft":{"post":{"summary":"Draft a report with AI from the student’s sessions, mastery, goals and homework (tutoring:report-draft:v1)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string"},"periodLabel":{"type":"string","minLength":2,"maxLength":120}},"required":["studentId","periodLabel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"string"},"highlights":{"type":"string"},"focusNext":{"type":"string"}},"required":["summary","highlights","focusNext"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/progress-reports/{id}":{"get":{"summary":"A progress report with its evidence","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"periodLabel":{"type":"string"},"summary":{"type":"string"},"highlights":{"type":"string"},"focusNext":{"type":"string"},"published":{"type":"boolean"},"publishedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"can":{"type":"object","properties":{"edit":{"type":"boolean"},"publish":{"type":"boolean"},"delete":{"type":"boolean"}},"required":["edit","publish","delete"],"additionalProperties":false},"insights":{"type":"object","properties":{"hasData":{"type":"boolean"},"avgMasteryPct":{"type":"number","nullable":true},"avgGainPct":{"type":"number","nullable":true},"sessionsCompleted":{"type":"integer"},"homeworkAccuracyPct":{"type":"number","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"subjectId":{"type":"string"},"subjectName":{"type":"string"},"avgMasteryPct":{"type":"number"},"gradeEquivalentLabel":{"type":"string"},"percentile":{"type":"number"},"gainPct":{"type":"number","nullable":true}},"required":["subjectId","subjectName","avgMasteryPct","gradeEquivalentLabel","percentile","gainPct"],"additionalProperties":false}},"assessedCount":{"type":"integer"},"statusCounts":{"type":"object","properties":{"mastered":{"type":"integer"},"proficient":{"type":"integer"},"developing":{"type":"integer"},"emerging":{"type":"integer"}},"required":["mastered","proficient","developing","emerging"],"additionalProperties":false},"topGains":{"type":"array","items":{"type":"object","properties":{"skillId":{"type":"string"},"name":{"type":"string"},"gainPct":{"type":"number"}},"required":["skillId","name","gainPct"],"additionalProperties":false}},"focusAreas":{"type":"array","items":{"type":"object","properties":{"skillId":{"type":"string"},"name":{"type":"string"},"masteryPct":{"type":"number"}},"required":["skillId","name","masteryPct"],"additionalProperties":false}},"homeworkDone":{"type":"integer"},"homeworkTotal":{"type":"integer"},"practiceCount":{"type":"integer"}},"required":["hasData","avgMasteryPct","avgGainPct","sessionsCompleted","homeworkAccuracyPct","subjects","assessedCount","statusCounts","topGains","focusAreas","homeworkDone","homeworkTotal","practiceCount"],"additionalProperties":false}},"required":["id","studentId","studentName","profileId","tutorName","periodLabel","summary","highlights","focusNext","published","publishedAt","createdAt","updatedAt","can","insights"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a report; publish=true publishes a draft and notifies the family (emits TutorProgressReportChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodLabel":{"type":"string","minLength":2,"maxLength":120},"summary":{"type":"string","minLength":2,"maxLength":20000},"highlights":{"type":"string","maxLength":20000},"focusNext":{"type":"string","maxLength":20000},"publish":{"type":"boolean","default":false}},"required":["periodLabel","summary","highlights","focusNext"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"published":{"type":"boolean"},"notified":{"type":"integer"}},"required":["id","published","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a draft report (published reports stay; emits TutorProgressReportChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/progress-reports/{id}/publish":{"post":{"summary":"Publish a draft and notify the family (emits TutorProgressReportChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"published":{"type":"boolean"},"notified":{"type":"integer"}},"required":["id","published","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/message-threads":{"get":{"summary":"Your message threads","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"threadKey":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"lastMessageAt":{"type":"string","nullable":true},"lastSnippet":{"type":"string","nullable":true},"unread":{"type":"integer"}},"required":["threadKey","familyId","familyName","profileId","tutorName","lastMessageAt","lastSnippet","unread"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/message-threads/messages":{"get":{"summary":"A conversation’s messages (poll with after=<last id>)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":191},"in":"query","name":"threadKey","required":true},{"schema":{"type":"string"},"in":"query","name":"after","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"threadKey":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"senderUserId":{"type":"string"},"senderName":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"},"readAt":{"type":"string","nullable":true},"mine":{"type":"boolean"}},"required":["id","senderUserId","senderName","body","createdAt","readAt","mine"],"additionalProperties":false}}},"required":["threadKey","familyId","familyName","profileId","tutorName","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/messages":{"post":{"summary":"Send a message (emits TutorMessageSent; notifies the other side)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"threadKey":{"type":"string","minLength":3,"maxLength":191},"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["threadKey","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"object","properties":{"id":{"type":"string"},"senderUserId":{"type":"string"},"senderName":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"},"readAt":{"type":"string","nullable":true},"mine":{"type":"boolean"}},"required":["id","senderUserId","senderName","body","createdAt","readAt","mine"],"additionalProperties":false},"notified":{"type":"integer"}},"required":["id","message","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/message-threads/read":{"post":{"summary":"Mark a conversation read","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"threadKey":{"type":"string","minLength":3,"maxLength":191}},"required":["threadKey"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marked":{"type":"integer"}},"required":["marked"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/notifications":{"get":{"summary":"Your Omni Tutor notifications","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","enum":["reminder","report","message","system"]},"title":{"type":"string"},"body":{"type":"string"},"url":{"type":"string","nullable":true},"readAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","category","title","body","url","readAt","createdAt"],"additionalProperties":false}},"unread":{"type":"integer"},"prefs":{"type":"object","properties":{"emailReminders":{"type":"boolean"},"pushReminders":{"type":"boolean"},"emailReports":{"type":"boolean"},"pushReports":{"type":"boolean"},"emailMessages":{"type":"boolean"},"pushMessages":{"type":"boolean"},"emailAnnouncements":{"type":"boolean"}},"required":["emailReminders","pushReminders","emailReports","pushReports","emailMessages","pushMessages","emailAnnouncements"],"additionalProperties":false}},"required":["rows","unread","prefs"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/announcements":{"get":{"summary":"Program announcements","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"audience":{"type":"string","enum":["all","families","tutors","staff"]},"recipientCount":{"type":"integer"},"sentAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","audience","recipientCount","sentAt","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/notifications/{id}/read":{"post":{"summary":"Mark a notification read","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marked":{"type":"integer"},"unread":{"type":"integer"}},"required":["marked","unread"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/notifications/read-all":{"post":{"summary":"Mark every notification read","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marked":{"type":"integer"},"unread":{"type":"integer"}},"required":["marked","unread"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/notifications/{id}":{"delete":{"summary":"Remove a notification from your inbox","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marked":{"type":"integer"},"unread":{"type":"integer"}},"required":["marked","unread"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/notifications/prefs":{"put":{"summary":"Save your notification choices (emits TutorNotificationPrefsSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailReminders":{"type":"boolean"},"pushReminders":{"type":"boolean"},"emailReports":{"type":"boolean"},"pushReports":{"type":"boolean"},"emailMessages":{"type":"boolean"},"pushMessages":{"type":"boolean"},"emailAnnouncements":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"emailReminders":{"type":"boolean"},"pushReminders":{"type":"boolean"},"emailReports":{"type":"boolean"},"pushReports":{"type":"boolean"},"emailMessages":{"type":"boolean"},"pushMessages":{"type":"boolean"},"emailAnnouncements":{"type":"boolean"}},"required":["emailReminders","pushReminders","emailReports","pushReports","emailMessages","pushMessages","emailAnnouncements"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/funding-sources":{"get":{"summary":"Funding sources","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"fiscalYear":{"type":"string","nullable":true},"hoursBudget":{"type":"number","nullable":true},"isActive":{"type":"boolean"},"sessionsAllocated":{"type":"integer"}},"required":["id","name","code","fiscalYear","hoursBudget","isActive","sessionsAllocated"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a funding source (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","maxLength":4000,"nullable":true},"fiscalYear":{"type":"string","maxLength":20,"nullable":true},"hoursBudget":{"type":"number","minimum":0,"maximum":1000000,"nullable":true},"isActive":{"type":"boolean","default":true}},"required":["name","code"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hour-packages":{"get":{"summary":"Hours packages","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sessionCount":{"type":"integer"},"minutesPerSession":{"type":"integer"},"subjectId":{"type":"string","nullable":true},"fundingSourceId":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","name","sessionCount","minutesPerSession","subjectId","fundingSourceId","isActive"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an hours package (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"sessionCount":{"type":"integer","minimum":1,"maximum":500},"minutesPerSession":{"type":"integer","minimum":15,"maximum":180,"default":50},"subjectId":{"type":"string","nullable":true},"fundingSourceId":{"type":"string","nullable":true},"isActive":{"type":"boolean","default":true}},"required":["name","sessionCount"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/allocations":{"get":{"summary":"Hours allocated to families","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"string"},"in":"query","name":"familyId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"studentId":{"type":"string","nullable":true},"packageName":{"type":"string","nullable":true},"fundingSourceName":{"type":"string","nullable":true},"sessionsTotal":{"type":"integer"},"sessionsUsed":{"type":"integer"},"status":{"type":"string","enum":["active","exhausted","revoked"]},"allocatedAt":{"type":"string"}},"required":["id","familyId","familyName","studentId","packageName","fundingSourceName","sessionsTotal","sessionsUsed","status","allocatedAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Allocate tutoring sessions to a family (ADMIN; optional enrolment campaign code)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"familyId":{"type":"string"},"studentId":{"type":"string","nullable":true},"packageId":{"type":"string","nullable":true},"fundingSourceId":{"type":"string","nullable":true},"sessionsTotal":{"type":"integer","minimum":1,"maximum":500},"notes":{"type":"string","maxLength":4000,"nullable":true},"campaignCode":{"type":"string","maxLength":40,"nullable":true}},"required":["familyId","sessionsTotal"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"sessionsTotal":{"type":"integer"},"bonusSessions":{"type":"integer"}},"required":["id","sessionsTotal","bonusSessions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hour-entries":{"get":{"summary":"Tutor hours","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"string"},"in":"query","name":"familyId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"occurredAt":{"type":"string"},"minutes":{"type":"integer"},"hours":{"type":"number"},"kind":{"type":"string","enum":["session","manual"]},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","submitted","approved","rejected"]},"timesheetId":{"type":"string","nullable":true},"sessionId":{"type":"string","nullable":true},"studentName":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true}},"required":["id","profileId","occurredAt","minutes","hours","kind","description","status","timesheetId","sessionId"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add hours by hand (prep time, a parent call)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"occurredAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"minutes":{"type":"integer","minimum":5,"maximum":600},"description":{"type":"string","minLength":2,"maxLength":300}},"required":["occurredAt","minutes","description"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/timesheets":{"get":{"summary":"Stipend timesheets","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"profileId","required":false},{"schema":{"type":"string"},"in":"query","name":"familyId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"periodLabel":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"totalMinutes":{"type":"integer"},"totalHours":{"type":"number"},"stipendAmount":{"type":"number","nullable":true},"status":{"type":"string","enum":["submitted","approved","rejected","exported"]},"submittedAt":{"type":"string"},"reviewedAt":{"type":"string","nullable":true},"districtRef":{"type":"string","nullable":true},"tutorNote":{"type":"string","nullable":true},"reviewNote":{"type":"string","nullable":true},"entryCount":{"type":"integer"},"exportedAt":{"type":"string","nullable":true}},"required":["id","profileId","tutorName","periodLabel","periodStart","periodEnd","totalMinutes","totalHours","stipendAmount","status","submittedAt","reviewedAt","districtRef"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Submit a stipend timesheet for a period","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodLabel":{"type":"string","minLength":2,"maxLength":60},"tutorNote":{"type":"string","maxLength":4000,"nullable":true}},"required":["periodStart","periodEnd","periodLabel"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"entries":{"type":"integer"},"totalMinutes":{"type":"integer"},"totalHours":{"type":"number"},"stipendAmount":{"type":"number","nullable":true}},"required":["id","entries","totalMinutes","totalHours","stipendAmount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/stipend-batches":{"get":{"summary":"Stipend batches for the business office","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string","nullable":true},"totalHours":{"type":"number"},"totalAmount":{"type":"number"},"method":{"type":"string","enum":["payroll","stipend","contract_invoice","manual"]},"status":{"type":"string","enum":["pending","sent","paid","failed"]},"timesheetCount":{"type":"integer"},"sentAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","profileId","totalHours","totalAmount","method","status","timesheetCount","sentAt","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Batch approved timesheets for the business office (ADMIN; Omni Tutor markEarningsPaid)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timesheetIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500},"method":{"type":"string","enum":["payroll","stipend","contract_invoice","manual"]},"payrollRef":{"type":"string","maxLength":120,"nullable":true},"scheduledFor":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["timesheetIds","method"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hours/me":{"get":{"summary":"Your hours ready to submit and your stipend setup","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pendingCount":{"type":"integer"},"pendingMinutes":{"type":"integer"},"pendingHours":{"type":"number"},"firstPending":{"type":"string","nullable":true},"lastPending":{"type":"string","nullable":true},"stipendRate":{"type":"number"},"rateSource":{"type":"string","enum":["profile","program","none"]},"estimatedStipend":{"type":"number","nullable":true},"stipendMethod":{"type":"string","enum":["payroll","stipend","contract_invoice"],"nullable":true},"payrollRef":{"type":"string","nullable":true},"stipendSetupAt":{"type":"string","nullable":true},"tutorType":{"type":"string"}},"required":["pendingCount","pendingMinutes","pendingHours","firstPending","lastPending","stipendRate","rateSource","estimatedStipend","stipendMethod","payrollRef","stipendSetupAt","tutorType"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hour-entries/{id}":{"put":{"summary":"Edit one of your manual entries","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"occurredAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"minutes":{"type":"integer","minimum":5,"maximum":600},"description":{"type":"string","minLength":2,"maxLength":300}},"required":["occurredAt","minutes","description"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete one of your manual entries","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/campaigns":{"get":{"summary":"Enrolment campaigns","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"bonusSessions":{"type":"integer","nullable":true},"bonusPct":{"type":"integer","nullable":true},"usesAllowed":{"type":"integer"},"usesCount":{"type":"integer"},"expiresAt":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","code","description","bonusSessions","bonusPct","usesAllowed","usesCount","expiresAt","isActive"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an enrolment campaign code (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":40,"pattern":"^[A-Z0-9_-]+$"},"description":{"type":"string","maxLength":2000,"nullable":true},"bonusSessions":{"type":"integer","minimum":0,"maximum":50,"nullable":true},"bonusPct":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"usesAllowed":{"type":"integer","minimum":0,"maximum":100000,"default":0},"expiresAt":{"type":"string","nullable":true}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/my-referral":{"get":{"summary":"Your referral code","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string","nullable":true},"ownerRole":{"type":"string","enum":["PARENT","TUTOR"],"nullable":true},"usesCount":{"type":"integer"},"rewardSessions":{"type":"integer"},"redeemerBonusSessions":{"type":"integer"},"redemptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fulfilled":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","fulfilled","createdAt"],"additionalProperties":false}}},"required":["code","ownerRole","usesCount","rewardSessions","redeemerBonusSessions","redemptions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create your referral code if you have none (emits TutorReferralChanged)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string","nullable":true},"ownerRole":{"type":"string","enum":["PARENT","TUTOR"],"nullable":true},"usesCount":{"type":"integer"},"rewardSessions":{"type":"integer"},"redeemerBonusSessions":{"type":"integer"},"redemptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fulfilled":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","fulfilled","createdAt"],"additionalProperties":false}}},"required":["code","ownerRole","usesCount","rewardSessions","redeemerBonusSessions","redemptions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/testimonials":{"get":{"summary":"Family feedback quotes","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorName":{"type":"string"},"studentFirstName":{"type":"string","nullable":true},"studentGrade":{"type":"string","nullable":true},"quote":{"type":"string"},"isPublic":{"type":"boolean"},"featured":{"type":"boolean"},"profileId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","authorName","studentFirstName","studentGrade","quote","isPublic","featured","profileId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a family feedback quote (as a draft)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authorName":{"type":"string","minLength":1,"maxLength":120},"studentFirstName":{"type":"string","maxLength":100,"nullable":true},"studentGrade":{"type":"string","maxLength":4,"nullable":true},"profileId":{"type":"string","nullable":true},"quote":{"type":"string","minLength":5,"maxLength":4000},"isPublic":{"type":"boolean","default":false},"featured":{"type":"boolean","default":false}},"required":["authorName","quote"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/reviews":{"get":{"summary":"Session reviews from families","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"profileId":{"type":"string"},"rating":{"type":"integer"},"comment":{"type":"string","nullable":true},"isPublic":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","sessionId","profileId","rating","comment","isPublic","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/experiments":{"get":{"summary":"Outreach tests","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"weight":{"type":"integer"},"assigned":{"type":"integer"}},"required":["key","weight","assigned"],"additionalProperties":false}}},"required":["id","key","name","description","isActive","variants"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an outreach test with its variants","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":2,"maxLength":80},"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":60},"weight":{"type":"integer","minimum":0,"maximum":1000},"config":{"type":"string","maxLength":4000,"nullable":true}},"required":["key","weight"],"additionalProperties":false},"minItems":2,"maxItems":8}},"required":["key","name","variants"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/support-profiles":{"get":{"summary":"Students’ tutoring supports","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"hasPlan":{"type":"boolean"},"categories":{"type":"array","items":{"type":"string"}},"planType":{"type":"string","enum":["none","iep","plan_504","rti","gifted"]},"primaryConcern":{"type":"string","nullable":true},"accommodationCount":{"type":"integer"},"goalCount":{"type":"integer"},"reviewDate":{"type":"string","nullable":true},"iepLinked":{"type":"boolean"},"depIepStatus":{"type":"string","nullable":true}},"required":["studentId","studentName","gradeLevel","hasPlan","categories","planType","primaryConcern","accommodationCount","goalCount","reviewDate","iepLinked","depIepStatus"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/students/{studentId}/support-profile":{"get":{"summary":"A student’s tutoring supports and DEP IEP","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentId":{"type":"string"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"canEdit":{"type":"boolean"},"profile":{"type":"object","properties":{"id":{"type":"string","nullable":true},"planType":{"type":"string","enum":["none","iep","plan_504","rti","gifted"]},"categories":{"type":"array","items":{"type":"string"}},"primaryConcern":{"type":"string","nullable":true},"presentLevels":{"type":"string","nullable":true},"strengths":{"type":"string","nullable":true},"accommodations":{"type":"array","items":{"type":"string"}},"modifications":{"type":"string","nullable":true},"strategies":{"type":"array","items":{"type":"string"}},"sensoryNeeds":{"type":"string","nullable":true},"behaviorNotes":{"type":"string","nullable":true},"confidentialNotes":{"type":"string","nullable":true},"reviewDate":{"type":"string","nullable":true},"iepRecordId":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"area":{"type":"string"},"description":{"type":"string"},"baseline":{"type":"string","nullable":true},"target":{"type":"string","nullable":true},"progress":{"type":"integer"},"status":{"type":"string","enum":["in_progress","met","revised"]},"iepGoalId":{"type":"string","nullable":true}},"required":["id","area","description","baseline","target","progress","status","iepGoalId"],"additionalProperties":false}}},"required":["id","planType","categories","primaryConcern","presentLevels","strengths","accommodations","modifications","strategies","sensoryNeeds","behaviorNotes","confidentialNotes","reviewDate","iepRecordId","updatedAt","goals"],"additionalProperties":false},"iep":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"planStart":{"type":"string"},"planEnd":{"type":"string"},"nextReviewDate":{"type":"string","nullable":true},"disabilityCategory":{"type":"string","nullable":true},"secondaryDisabilityCategory":{"type":"string","nullable":true},"lreSetting":{"type":"string","nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"goalArea":{"type":"string"},"statement":{"type":"string"},"measurableCriteria":{"type":"string"},"targetDate":{"type":"string","nullable":true}},"required":["id","goalArea","statement","measurableCriteria","targetDate"],"additionalProperties":false}},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"frequency":{"type":"string"}},"required":["id","category","description","frequency"],"additionalProperties":false}}},"required":["id","status","planStart","planEnd","nextReviewDate","disabilityCategory","secondaryDisabilityCategory","lreSetting","goals","accommodations"],"additionalProperties":false,"nullable":true}},"required":["studentId","studentName","gradeLevel","canEdit","profile","iep"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save a student’s tutoring supports (emits TutorSupportProfileSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planType":{"type":"string","enum":["none","iep","plan_504","rti","gifted"]},"categories":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20,"default":[]},"primaryConcern":{"type":"string","maxLength":300,"nullable":true},"presentLevels":{"type":"string","maxLength":20000,"nullable":true},"strengths":{"type":"string","maxLength":8000,"nullable":true},"accommodations":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":60,"default":[]},"modifications":{"type":"string","maxLength":8000,"nullable":true},"strategies":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":60,"default":[]},"sensoryNeeds":{"type":"string","maxLength":8000,"nullable":true},"behaviorNotes":{"type":"string","maxLength":8000,"nullable":true},"confidentialNotes":{"type":"string","maxLength":8000,"nullable":true},"reviewDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"linkIep":{"type":"boolean","default":true},"goals":{"type":"array","items":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":4000},"baseline":{"type":"string","maxLength":4000,"nullable":true},"target":{"type":"string","maxLength":4000,"nullable":true},"progress":{"type":"integer","minimum":0,"maximum":100,"default":0},"status":{"type":"string","enum":["in_progress","met","revised"],"default":"in_progress"}},"required":["area","description"],"additionalProperties":false},"maxItems":30,"default":[]}},"required":["planType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/translations":{"get":{"summary":"Translation coverage","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["lesson_segment","lesson","tutor_profile","subject","methodology","hour_package","family","progress_report","homework","learning_plan","learning_goal"]},"items":{"type":"integer"},"translated":{"type":"object","properties":{"es":{"type":"integer"},"zh":{"type":"integer"}},"required":["es","zh"],"additionalProperties":false}},"required":["resourceType","items","translated"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save one field’s translation (an empty value clears it; emits TutorTranslationSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resourceType":{"type":"string","enum":["lesson_segment","lesson","tutor_profile","subject","methodology","hour_package","family","progress_report","homework","learning_plan","learning_goal"]},"resourceId":{"type":"string"},"field":{"type":"string","minLength":1,"maxLength":60},"locale":{"type":"string","enum":["es","zh"]},"value":{"type":"string","maxLength":200000}},"required":["resourceType","resourceId","field","locale","value"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/translations/{type}":{"get":{"summary":"Translatable items of one content type with their Spanish and Chinese text","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","enum":["library","all"],"default":"library"},"in":"query","name":"scope","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":15},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string","enum":["subject","methodology","tutor_profile","lesson","hour_package"]},"in":"path","name":"type","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["subject","methodology","tutor_profile","lesson","hour_package"]},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","enum":["lesson_segment","lesson","tutor_profile","subject","methodology","hour_package","family","progress_report","homework","learning_plan","learning_goal"]},"id":{"type":"string"},"label":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"},"long":{"type":"boolean"},"es":{"type":"string"},"zh":{"type":"string"}},"required":["name","source","long","es","zh"],"additionalProperties":false}}},"required":["resourceType","id","label","fields"],"additionalProperties":false}}},"required":["type","total","items"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/finance/summary":{"get":{"summary":"Hours & stipends: figures, funding use and the 12-month trend","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"awaiting":{"type":"object","properties":{"count":{"type":"integer"},"hours":{"type":"number"},"amount":{"type":"number"}},"required":["count","hours","amount"],"additionalProperties":false},"readyToBatch":{"type":"object","properties":{"count":{"type":"integer"},"hours":{"type":"number"},"amount":{"type":"number"}},"required":["count","hours","amount"],"additionalProperties":false},"returned":{"type":"integer"},"allocations":{"type":"object","properties":{"active":{"type":"integer"},"exhausted":{"type":"integer"},"revoked":{"type":"integer"},"sessionsRemaining":{"type":"integer"}},"required":["active","exhausted","revoked","sessionsRemaining"],"additionalProperties":false},"draws":{"type":"object","properties":{"drawn":{"type":"integer"},"unfunded":{"type":"integer"},"returned":{"type":"integer"}},"required":["drawn","unfunded","returned"],"additionalProperties":false},"paidThisYear":{"type":"object","properties":{"hours":{"type":"number"},"amount":{"type":"number"}},"required":["hours","amount"],"additionalProperties":false},"fundingSources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"fiscalYear":{"type":"string","nullable":true},"hoursBudget":{"type":"number","nullable":true},"isActive":{"type":"boolean"},"sessionsAllocated":{"type":"integer"},"sessionsUsed":{"type":"integer"},"hoursFunded":{"type":"number"},"families":{"type":"integer"}},"required":["id","name","code","description","fiscalYear","hoursBudget","isActive","sessionsAllocated","sessionsUsed","hoursFunded","families"],"additionalProperties":false}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"sessionCount":{"type":"integer"},"minutesPerSession":{"type":"integer"},"subjectId":{"type":"string","nullable":true},"subjectName":{"type":"string","nullable":true},"fundingSourceId":{"type":"string","nullable":true},"fundingSourceName":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"allocations":{"type":"integer"}},"required":["id","name","description","sessionCount","minutesPerSession","subjectId","subjectName","fundingSourceId","fundingSourceName","isActive","allocations"],"additionalProperties":false}},"months":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"hours":{"type":"number"},"sessionsFunded":{"type":"integer"},"stipends":{"type":"number"}},"required":["label","hours","sessionsFunded","stipends"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"fiscalYearStart":{"type":"string"}},"required":["awaiting","readyToBatch","returned","allocations","draws","paidThisYear","fundingSources","packages","months","subjects","fiscalYearStart"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/funding-sources/{id}":{"put":{"summary":"Edit a funding source (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":30},"description":{"type":"string","maxLength":4000,"nullable":true},"fiscalYear":{"type":"string","maxLength":20,"nullable":true},"hoursBudget":{"type":"number","minimum":0,"maximum":1000000,"nullable":true},"isActive":{"type":"boolean","default":true}},"required":["name","code"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hour-packages/{id}":{"put":{"summary":"Edit an hours package (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":4000,"nullable":true},"sessionCount":{"type":"integer","minimum":1,"maximum":500},"minutesPerSession":{"type":"integer","minimum":15,"maximum":180,"default":50},"subjectId":{"type":"string","nullable":true},"fundingSourceId":{"type":"string","nullable":true},"isActive":{"type":"boolean","default":true}},"required":["name","sessionCount"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/finance/families":{"get":{"summary":"Families and their students, for the allocate form","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","status","students"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/allocations/{id}/withdraw":{"post":{"summary":"Withdraw an allocation (ADMIN; Omni Tutor refund)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":2,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/finance/allocations":{"get":{"summary":"Allocations with student, package, funding source and notes","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"fundingSourceId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"studentName":{"type":"string","nullable":true},"packageName":{"type":"string","nullable":true},"fundingSourceName":{"type":"string","nullable":true},"campaignCode":{"type":"string","nullable":true},"sessionsTotal":{"type":"integer"},"sessionsUsed":{"type":"integer"},"status":{"type":"string","enum":["active","exhausted","revoked"]},"allocatedAt":{"type":"string"},"notes":{"type":"string","nullable":true}},"required":["id","familyId","familyName","studentName","packageName","fundingSourceName","campaignCode","sessionsTotal","sessionsUsed","status","allocatedAt","notes"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/hour-draws":{"get":{"summary":"Ledger: every session drawn on a family allocation","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"fundingSourceId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"sessionAt":{"type":"string"},"studentName":{"type":"string"},"tutorName":{"type":"string"},"subjectName":{"type":"string"},"familyName":{"type":"string","nullable":true},"fundingSourceName":{"type":"string","nullable":true},"packageName":{"type":"string","nullable":true},"sessionsDrawn":{"type":"integer"},"status":{"type":"string","enum":["drawn","unfunded","returned"]}},"required":["id","sessionId","sessionAt","studentName","tutorName","subjectName","familyName","fundingSourceName","packageName","sessionsDrawn","status"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/timesheets/{id}/review":{"post":{"summary":"Approve or return a submitted timesheet (admin or site manager)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reviewNote":{"type":"string","maxLength":4000,"nullable":true},"districtRef":{"type":"string","maxLength":120,"nullable":true}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/timesheets/{id}/export":{"get":{"summary":"Download an approved timesheet as CSV for the business office (marks it exported)","tags":["Omni Tutor"],"description":"text/csv","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/finance/batches":{"get":{"summary":"Stipend batches with their timesheets (ADMIN)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tutorNames":{"type":"array","items":{"type":"string"}},"totalHours":{"type":"number"},"totalAmount":{"type":"number"},"method":{"type":"string","enum":["payroll","stipend","contract_invoice","manual"]},"status":{"type":"string","enum":["pending","sent","paid","failed"]},"payrollRef":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"scheduledFor":{"type":"string","nullable":true},"sentAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"timesheets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tutorName":{"type":"string"},"periodLabel":{"type":"string"},"totalHours":{"type":"number"},"stipendAmount":{"type":"number","nullable":true}},"required":["id","tutorName","periodLabel","totalHours","stipendAmount"],"additionalProperties":false}}},"required":["id","tutorNames","totalHours","totalAmount","method","status","payrollRef","errorMessage","scheduledFor","sentAt","createdAt","timesheets"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/stipend-batches/{id}":{"patch":{"summary":"Move a stipend batch: sent, paid, problem or back to pending (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sent","paid","failed"]},"errorMessage":{"type":"string","maxLength":4000,"nullable":true}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/campaigns/overview":{"get":{"summary":"Enrolment campaigns with redemptions (ADMIN)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"description":{"type":"string","nullable":true},"bonusSessions":{"type":"integer","nullable":true},"bonusPct":{"type":"integer","nullable":true},"usesAllowed":{"type":"integer"},"usesCount":{"type":"integer"},"sessionsAdded":{"type":"integer"},"expiresAt":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","code","description","bonusSessions","bonusPct","usesAllowed","usesCount","sessionsAdded","expiresAt","isActive","createdAt"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"sessionsAdded":{"type":"integer"},"familyName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","code","sessionsAdded","familyName","createdAt"],"additionalProperties":false}},"totals":{"type":"object","properties":{"redemptions":{"type":"integer"},"sessionsAdded":{"type":"integer"},"referralRedemptions":{"type":"integer"}},"required":["redemptions","sessionsAdded","referralRedemptions"],"additionalProperties":false}},"required":["campaigns","recent","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/campaigns/{id}/active":{"patch":{"summary":"Enable or disable a campaign (ADMIN)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/testimonials/candidates":{"get":{"summary":"Five-star session reviews with comments — candidates for feedback quotes","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rating":{"type":"integer"},"comment":{"type":"string"},"tutorName":{"type":"string"},"studentFirstName":{"type":"string","nullable":true},"studentGrade":{"type":"string","nullable":true},"profileId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","rating","comment","tutorName","studentFirstName","studentGrade","profileId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/testimonials/{id}":{"patch":{"summary":"Publish/unpublish or feature/unfeature a feedback quote","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isPublic":{"type":"boolean"},"featured":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/experiments/results":{"get":{"summary":"Outreach tests with per-variant assignments and conversions","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"weight":{"type":"integer"},"config":{"type":"string","nullable":true},"assigned":{"type":"integer"},"inquiries":{"type":"integer"},"allocations":{"type":"integer"},"inquiryRate":{"type":"number"},"outcomes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}}},"required":["key","weight","config","assigned","inquiries","allocations","inquiryRate","outcomes"],"additionalProperties":false}}},"required":["id","key","name","description","isActive","createdAt","variants"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/experiments/{id}/active":{"patch":{"summary":"Pause or resume an outreach test","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/analytics/summary":{"get":{"summary":"Program analytics summary","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":730,"default":90},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"since":{"type":"string"},"funnel":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"sessions":{"type":"object","properties":{"completed":{"type":"integer"},"canceled":{"type":"integer"},"noShow":{"type":"integer"},"scheduled":{"type":"integer"}},"required":["completed","canceled","noShow","scheduled"],"additionalProperties":false},"hoursTaught":{"type":"number"},"averageRating":{"type":"number","nullable":true},"students":{"type":"integer"},"tutors":{"type":"integer"}},"required":["since","funnel","sessions","hoursTaught","averageRating","students","tutors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/analytics/events":{"get":{"summary":"Top program events and the headline event per day (admin/analytics)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":365,"default":30},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"since":{"type":"string"},"total":{"type":"integer"},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"headline":{"type":"string"},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"count":{"type":"integer"}},"required":["day","count"],"additionalProperties":false}}},"required":["since","total","top","headline","daily"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/analytics/trends":{"get":{"summary":"The program month by month: mastery, attendance, sessions, hours and ratings (12 months)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"months":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"avgMastery":{"type":"number","nullable":true},"sessionsCompleted":{"type":"integer"},"attendancePct":{"type":"number","nullable":true},"hoursTaught":{"type":"number"},"avgRating":{"type":"number","nullable":true},"activeStudents":{"type":"integer"},"reportsPublished":{"type":"integer"}},"required":["label","avgMastery","sessionsCompleted","attendancePct","hoursTaught","avgRating","activeStudents","reportsPublished"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"subject":{"type":"string"},"students":{"type":"integer"},"baselinePct":{"type":"number","nullable":true},"currentPct":{"type":"number"},"gainPct":{"type":"number","nullable":true}},"required":["subject","students","baselinePct","currentPct","gainPct"],"additionalProperties":false}},"mastery":{"type":"object","properties":{"notAssessed":{"type":"integer"},"emerging":{"type":"integer"},"developing":{"type":"integer"},"proficient":{"type":"integer"},"mastered":{"type":"integer"}},"required":["notAssessed","emerging","developing","proficient","mastered"],"additionalProperties":false}},"required":["months","subjects","mastery"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/analytics/outcomes":{"get":{"summary":"Student outcomes export: one row per student × subject (pseudonymized unless identified=1)","tags":["Omni Tutor"],"description":"format=csv returns text/csv; summary returns headline figures and a 20-row sample.","parameters":[{"schema":{"type":"string","enum":["json","csv","summary"],"default":"json"},"in":"query","name":"format","required":false},{"schema":{"type":"string","enum":["0","1"],"default":"0"},"in":"query","name":"identified","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/audit":{"get":{"summary":"Omni Tutor audit log","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"actorUserId":{"type":"string","nullable":true},"action":{"type":"string"},"resource":{"type":"string"},"resourceId":{"type":"string","nullable":true}},"required":["id","at","actorUserId","action","resource","resourceId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/audit/log":{"get":{"summary":"Omni Tutor audit log with actors, roles and action counts (ADMIN)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"action","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"actorName":{"type":"string"},"actorRole":{"type":"string","nullable":true},"actorSiteManager":{"type":"boolean"},"action":{"type":"string"},"resource":{"type":"string"},"resourceId":{"type":"string","nullable":true},"details":{"type":"string"}},"required":["id","at","actorName","actorRole","actorSiteManager","action","resource","resourceId","details"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"count":{"type":"integer"}},"required":["action","count"],"additionalProperties":false}}},"required":["rows","actions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/audit/events":{"get":{"summary":"The Omni Tutor event trail (Tutor* events; ADMIN)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"type","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"type":{"type":"string"},"actorName":{"type":"string","nullable":true},"summary":{"type":"string"}},"required":["id","at","type","actorName","summary"],"additionalProperties":false}},"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"}},"required":["type","count"],"additionalProperties":false}}},"required":["rows","types"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/pipeline":{"get":{"summary":"Program pipeline: families by stage and requests not yet a family","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"families":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"studentCount":{"type":"integer"},"studentNames":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["id","name","studentCount","studentNames","createdAt"],"additionalProperties":false}},"inquiries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"studentName":{"type":"string"},"studentGrade":{"type":"string"},"subjects":{"type":"string"},"source":{"type":"string","enum":["in_app","staff_referral","campaign","family_referral"]},"createdAt":{"type":"string"}},"required":["id","parentName","studentName","studentGrade","subjects","source","createdAt"],"additionalProperties":false}}},"required":["status","families","inquiries"],"additionalProperties":false}},"paused":{"type":"integer"},"completed":{"type":"integer"}},"required":["stages","paused","completed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/families":{"get":{"summary":"Program families (admin list)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"createdAt":{"type":"string"},"guardianName":{"type":"string","nullable":true},"studentFirstNames":{"type":"array","items":{"type":"string"}},"tutors":{"type":"array","items":{"type":"string"}}},"required":["id","name","status","createdAt","guardianName","studentFirstNames","tutors"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/families/{id}":{"get":{"summary":"One program family (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"notes":{"type":"string","nullable":true},"timezone":{"type":"string"},"createdAt":{"type":"string"},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentPersonId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"pronouns":{"type":"string","nullable":true},"interests":{"type":"string","nullable":true},"goals":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"source":{"type":"string","enum":["admin_match","request"]},"startedAt":{"type":"string"}},"required":["id","subjectName","profileId","tutorName","source","startedAt"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]}},"required":["id","subjectName","status"],"additionalProperties":false}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"},"startsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]}},"required":["id","subjectName","tutorName","startsAt","status"],"additionalProperties":false}}},"required":["id","studentPersonId","name","gradeLevel","pronouns","interests","goals","isActive","enrollments","diagnostics","sessions"],"additionalProperties":false}},"guardians":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"relationship":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"isMember":{"type":"boolean"}},"required":["personId","name","relationship","email","phone","isMember"],"additionalProperties":false}},"allocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionsTotal":{"type":"integer"},"sessionsUsed":{"type":"integer"},"status":{"type":"string","enum":["active","exhausted","revoked"]},"fundingSource":{"type":"string","nullable":true},"packageName":{"type":"string","nullable":true},"studentName":{"type":"string","nullable":true},"allocatedAt":{"type":"string"}},"required":["id","sessionsTotal","sessionsUsed","status","fundingSource","packageName","studentName","allocatedAt"],"additionalProperties":false}},"inquiries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","parentName","createdAt"],"additionalProperties":false}}},"required":["id","name","status","notes","timezone","createdAt","students","guardians","allocations","inquiries"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a family’s name, stage or internal notes (TutorFamilyChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]},"notes":{"type":"string","maxLength":8000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/students/{id}":{"patch":{"summary":"Edit a program student’s grade, interests and goals (TutorStudentChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gradeLevel":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"interests":{"type":"string","maxLength":4000,"nullable":true},"goals":{"type":"string","maxLength":4000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/tutors":{"get":{"summary":"Tutor roster (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string","enum":["all","active","inactive"],"default":"all"},"in":"query","name":"active","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"headline":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"tutorType":{"type":"string","enum":["staff","contracted"]},"isActive":{"type":"boolean"},"yearsExp":{"type":"integer"},"stipendRate":{"type":"number"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"methodologies":{"type":"array","items":{"type":"string"}},"activeStudents":{"type":"integer"},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]},"memberId":{"type":"string","nullable":true},"siteManager":{"type":"boolean"},"memberActive":{"type":"boolean"}},"required":["id","personId","name","email","headline","photoUrl","tutorType","isActive","yearsExp","stipendRate","subjects","methodologies","activeStudents","backgroundCheckStatus","memberId","siteManager","memberActive"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/tutors/{id}":{"get":{"summary":"One tutor (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"headline":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"tutorType":{"type":"string","enum":["staff","contracted"]},"isActive":{"type":"boolean"},"yearsExp":{"type":"integer"},"stipendRate":{"type":"number"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"methodologies":{"type":"array","items":{"type":"string"}},"activeStudents":{"type":"integer"},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]},"memberId":{"type":"string","nullable":true},"siteManager":{"type":"boolean"},"memberActive":{"type":"boolean"},"bio":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"stipendMethod":{"type":"string","enum":["payroll","stipend","contract_invoice"],"nullable":true},"payrollRef":{"type":"string","nullable":true},"backgroundCheckCompletedAt":{"type":"string","nullable":true},"backgroundCheckExpiresAt":{"type":"string","nullable":true},"documents":{"type":"object","properties":{"pending":{"type":"integer"},"approved":{"type":"integer"},"rejected":{"type":"integer"}},"required":["pending","approved","rejected"],"additionalProperties":false},"sessions":{"type":"object","properties":{"upcoming":{"type":"integer"},"completed":{"type":"integer"}},"required":["upcoming","completed"],"additionalProperties":false},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"},"students":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string"},"familyId":{"type":"string"},"name":{"type":"string"},"subjectName":{"type":"string"}},"required":["studentId","familyId","name","subjectName"],"additionalProperties":false}},"canSetSiteManager":{"type":"boolean"}},"required":["id","personId","name","email","headline","photoUrl","tutorType","isActive","yearsExp","stipendRate","subjects","methodologies","activeStudents","backgroundCheckStatus","memberId","siteManager","memberActive","bio","credentials","stipendMethod","payrollRef","backgroundCheckCompletedAt","backgroundCheckExpiresAt","documents","sessions","rating","reviewCount","students","canSetSiteManager"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Edit a tutor’s profile, stipend rate and active flag (TutorProfileChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headline":{"type":"string","maxLength":200,"nullable":true},"bio":{"type":"string","maxLength":8000,"nullable":true},"credentials":{"type":"string","maxLength":4000,"nullable":true},"yearsExp":{"type":"integer","minimum":0,"maximum":60},"stipendRate":{"type":"number","minimum":0,"maximum":1000},"isActive":{"type":"boolean"}},"required":["headline","bio","credentials","yearsExp","stipendRate","isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/tutors/{id}/active":{"patch":{"summary":"Make a tutor active (visible and assignable) or inactive (TutorProfileChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions":{"get":{"summary":"All program sessions (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string","enum":["all","upcoming","past"],"default":"all"},"in":"query","name":"when","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"studentId":{"type":"string"},"studentName":{"type":"string"},"familyId":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectName":{"type":"string"},"hasNote":{"type":"boolean"},"lateCancel":{"type":"boolean"},"hasAdminNote":{"type":"boolean"}},"required":["id","startsAt","endsAt","status","studentId","studentName","familyId","profileId","tutorName","subjectName","hasNote","lateCancel","hasAdminNote"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions/{id}":{"get":{"summary":"One session (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"location":{"type":"string","enum":["online","in_person"]},"studentId":{"type":"string"},"studentName":{"type":"string"},"gradeLevel":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectName":{"type":"string"},"seriesId":{"type":"string","nullable":true},"seriesRemaining":{"type":"integer"},"rescheduleCount":{"type":"integer"},"previousStartsAt":{"type":"string","nullable":true},"canceledAt":{"type":"string","nullable":true},"canceledBy":{"type":"string","nullable":true},"cancelReason":{"type":"string","nullable":true},"lateCancel":{"type":"boolean"},"adminNote":{"type":"string","nullable":true},"note":{"type":"object","properties":{"summary":{"type":"string"},"worksOn":{"type":"string"},"homework":{"type":"string","nullable":true}},"required":["summary","worksOn","homework"],"additionalProperties":false,"nullable":true},"review":{"type":"object","properties":{"rating":{"type":"integer"},"comment":{"type":"string","nullable":true}},"required":["rating","comment"],"additionalProperties":false,"nullable":true},"hours":{"type":"object","properties":{"minutes":{"type":"integer"},"status":{"type":"string"}},"required":["minutes","status"],"additionalProperties":false,"nullable":true},"drawStatus":{"type":"string","nullable":true},"recordingUrl":{"type":"string","nullable":true},"videoMeetingId":{"type":"string","nullable":true},"lateCancelHours":{"type":"integer"}},"required":["id","startsAt","endsAt","status","location","studentId","studentName","gradeLevel","familyId","familyName","profileId","tutorName","subjectName","seriesId","seriesRemaining","rescheduleCount","previousStartsAt","canceledAt","canceledBy","cancelReason","lateCancel","adminNote","note","review","hours","drawStatus","recordingUrl","videoMeetingId","lateCancelHours"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions/{id}/reschedule":{"post":{"summary":"Move a session (admin; TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string"},"scope":{"type":"string","enum":["one","series"],"default":"one"},"reason":{"type":"string","maxLength":2000,"nullable":true}},"required":["startsAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions/{id}/cancel":{"post":{"summary":"Cancel a session (admin; TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000,"nullable":true},"scope":{"type":"string","enum":["one","series"],"default":"one"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions/{id}/end":{"post":{"summary":"Force-end a session stuck live (admin; TutorSessionChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/sessions/{id}/note":{"put":{"summary":"Internal admin note on a session (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"adminNote":{"type":"string","maxLength":8000,"nullable":true}},"required":["adminNote"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/inquiries":{"get":{"summary":"Requests for tutoring (admin) with counts per status","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"parentEmail":{"type":"string"},"studentName":{"type":"string"},"studentGrade":{"type":"string"},"subjects":{"type":"string"},"status":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"source":{"type":"string","enum":["in_app","staff_referral","campaign","family_referral"]},"familyId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","parentName","parentEmail","studentName","studentGrade","subjects","status","source","familyId","createdAt"],"additionalProperties":false}},"total":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["rows","total","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/inquiries/{id}":{"get":{"summary":"One request for tutoring (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"parentName":{"type":"string"},"parentEmail":{"type":"string"},"parentPhone":{"type":"string","nullable":true},"studentName":{"type":"string"},"studentGrade":{"type":"string"},"subjects":{"type":"string"},"goals":{"type":"string"},"preferredTimes":{"type":"string","nullable":true},"status":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","converted","closed"]},"source":{"type":"string","enum":["in_app","staff_referral","campaign","family_referral"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"familyId":{"type":"string","nullable":true},"familyName":{"type":"string","nullable":true},"submittedBy":{"type":"string","nullable":true},"campaignCode":{"type":"string","nullable":true},"guardianPersonId":{"type":"string","nullable":true},"studentPersonId":{"type":"string","nullable":true}},"required":["id","parentName","parentEmail","parentPhone","studentName","studentGrade","subjects","goals","preferredTimes","status","source","createdAt","updatedAt","familyId","familyName","submittedBy","campaignCode","guardianPersonId","studentPersonId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/inquiries/{id}/status":{"patch":{"summary":"Move a request for tutoring (TutorInquiryChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","contacted","consultation_scheduled","consultation_complete","closed"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/inquiries/{id}/candidates":{"get":{"summary":"DEP students and their guardians this request could be enrolled as","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"localId":{"type":"string"},"inProgram":{"type":"object","properties":{"familyId":{"type":"string"},"familyName":{"type":"string"}},"required":["familyId","familyName"],"additionalProperties":false,"nullable":true},"guardians":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"relationship":{"type":"string"},"email":{"type":"string","nullable":true},"hasLogin":{"type":"boolean"}},"required":["personId","name","relationship","email","hasLogin"],"additionalProperties":false}}},"required":["personId","name","localId","inProgram","guardians"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/inquiries/{id}/convert":{"post":{"summary":"Enrol a request as a program family on DEP’s student and guardian (TutorInquiryChanged, TutorFamilyChanged, TutorStudentChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","minLength":1},"guardianPersonId":{"type":"string","minLength":1},"familyName":{"type":"string","maxLength":200}},"required":["studentPersonId","guardianPersonId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"familyId":{"type":"string"},"created":{"type":"boolean"},"parentMember":{"type":"string","enum":["added","already","no_login","other_role"]},"message":{"type":"string"}},"required":["familyId","created","parentMember","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications":{"get":{"summary":"Tutor applications (admin) with counts per status","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked","approved","declined"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"highestDegree":{"type":"string"},"yearsTeaching":{"type":"integer"},"location":{"type":"string","nullable":true},"subjects":{"type":"string"},"gradeLevels":{"type":"string"},"status":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked","approved","declined"]},"createdAt":{"type":"string"},"decisionAt":{"type":"string","nullable":true}},"required":["id","fullName","email","highestDegree","yearsTeaching","location","subjects","gradeLevels","status","createdAt","decisionAt"],"additionalProperties":false}},"total":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"}},"all":{"type":"integer"}},"required":["rows","total","counts","all"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications/{id}":{"get":{"summary":"One tutor application (admin)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"highestDegree":{"type":"string"},"yearsTeaching":{"type":"integer"},"location":{"type":"string","nullable":true},"subjects":{"type":"string"},"gradeLevels":{"type":"string"},"status":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked","approved","declined"]},"createdAt":{"type":"string"},"decisionAt":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"pronouns":{"type":"string","nullable":true},"teachingTypes":{"type":"string"},"credentials":{"type":"string","nullable":true},"methodologies":{"type":"string","nullable":true},"sampleWorkUrl":{"type":"string","nullable":true},"whyApply":{"type":"string"},"ref1Name":{"type":"string"},"ref1Role":{"type":"string"},"ref1Email":{"type":"string"},"ref2Name":{"type":"string","nullable":true},"ref2Role":{"type":"string","nullable":true},"ref2Email":{"type":"string","nullable":true},"backgroundConsent":{"type":"boolean"},"internalNotes":{"type":"string","nullable":true},"decidedBy":{"type":"string","nullable":true},"approvedProfileId":{"type":"string","nullable":true},"applicant":{"type":"object","properties":{"personId":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"personType":{"type":"string","nullable":true},"hasLogin":{"type":"boolean"},"currentRole":{"type":"string","nullable":true}},"required":["personId","name","personType","hasLogin","currentRole"],"additionalProperties":false}},"required":["id","fullName","email","highestDegree","yearsTeaching","location","subjects","gradeLevels","status","createdAt","decisionAt","phone","pronouns","teachingTypes","credentials","methodologies","sampleWorkUrl","whyApply","ref1Name","ref1Role","ref1Email","ref2Name","ref2Role","ref2Email","backgroundConsent","internalNotes","decidedBy","approvedProfileId","applicant"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications/{id}/status":{"patch":{"summary":"Move a tutor application (TutorApplicationChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","reviewing","demo_scheduled","references_checked"]},"internalNotes":{"type":"string","maxLength":8000,"nullable":true}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications/{id}/approve":{"post":{"summary":"Approve: tutor profile + TUTOR role on the applicant’s DEP person (TutorApplicationChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications/{id}/decline":{"post":{"summary":"Decline a tutor application (TutorApplicationChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":4000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/applications/bulk":{"post":{"summary":"Approve or decline several applications","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200},"action":{"type":"string","enum":["approve","decline"]}},"required":["ids","action"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}}},"required":["ok","failed","errors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/verification":{"get":{"summary":"Documents to verify and every tutor’s background check","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["id","degree","certification","background_check","other"]},"fileName":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"uploadedAt":{"type":"string"}},"required":["id","profileId","tutorName","title","kind","fileName","mimeType","uploadedAt"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tutorName":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["id","degree","certification","background_check","other"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedAt":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true}},"required":["id","tutorName","title","kind","status","reviewedAt","reviewNotes"],"additionalProperties":false}},"tutors":{"type":"array","items":{"type":"object","properties":{"profileId":{"type":"string"},"name":{"type":"string"},"docCount":{"type":"integer"},"approvedDocs":{"type":"integer"},"status":{"type":"string","enum":["none","pending","passed","failed","expired"]},"provider":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"expiringSoon":{"type":"boolean"}},"required":["profileId","name","docCount","approvedDocs","status","provider","reference","completedAt","expiresAt","expiringSoon"],"additionalProperties":false}},"requireBackgroundCheck":{"type":"boolean"}},"required":["pending","recent","tutors","requireBackgroundCheck"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/documents/{id}/review":{"post":{"summary":"Approve or reject a tutor’s document (TutorDocumentChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"notes":{"type":"string","maxLength":4000,"nullable":true}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/tutors/{id}/background":{"put":{"summary":"Record a tutor’s background-check status (TutorBackgroundCheckChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","passed","failed","expired"]},"provider":{"type":"string","maxLength":60,"nullable":true},"reference":{"type":"string","maxLength":120,"nullable":true},"notes":{"type":"string","maxLength":4000,"nullable":true}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/match/{studentId}":{"get":{"summary":"Match screen: a student and the tutors who could take them","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"familyId":{"type":"string"},"familyName":{"type":"string"},"familyStatus":{"type":"string"},"goals":{"type":"string","nullable":true},"interests":{"type":"string","nullable":true},"wantedSubjects":{"type":"array","items":{"type":"string"}}},"required":["id","name","gradeLevel","familyId","familyName","familyStatus","goals","interests","wantedSubjects"],"additionalProperties":false},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"startedAt":{"type":"string"}},"required":["id","profileId","tutorName","subjectId","subjectName","startedAt"],"additionalProperties":false}},"tutors":{"type":"array","items":{"type":"object","properties":{"profileId":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"activeStudents":{"type":"integer"},"backgroundCheckStatus":{"type":"string","enum":["none","pending","passed","failed","expired"]},"matchedSubjectIds":{"type":"array","items":{"type":"string"}},"reasons":{"type":"array","items":{"type":"string"}},"blocked":{"type":"string","nullable":true}},"required":["profileId","name","headline","bio","photoUrl","subjects","activeStudents","backgroundCheckStatus","matchedSubjectIds","reasons","blocked"],"additionalProperties":false}}},"required":["student","enrollments","tutors"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/match":{"post":{"summary":"Match a student with a tutor for a subject (TutorMatchChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","minLength":1},"profileId":{"type":"string","minLength":1},"subjectId":{"type":"string","minLength":1}},"required":["studentId","profileId","subjectId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enrollmentId":{"type":"string"},"familyStatus":{"type":"string"},"message":{"type":"string"}},"required":["enrollmentId","familyStatus","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/lessons/options":{"get":{"summary":"What the admin lesson screens pick from (subjects, skills, library)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"strand":{"type":"string"},"subjectId":{"type":"string"},"gradeNum":{"type":"integer"},"gradeBand":{"type":"string"}},"required":["id","code","name","strand","subjectId","gradeNum","gradeBand"],"additionalProperties":false}},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"}},"required":["id","title","kind","subjectId","subjectName","gradeMin","gradeMax"],"additionalProperties":false}}},"required":["subjects","skills","resources"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/lessons":{"post":{"summary":"Create a program lesson (no tutor author; emits TutorLessonChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"subjectId":{"type":"string"},"gradeMin":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"gradeMax":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]},"objective":{"type":"string","minLength":2,"maxLength":8000},"agenda":{"type":"string","minLength":2,"maxLength":100000},"durationMinutes":{"type":"integer","minimum":10,"maximum":240,"default":50}},"required":["title","subjectId","gradeMin","gradeMax","objective","agenda"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/admin/announcements":{"get":{"summary":"Announcements sent, and how many people each audience reaches","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"counts":{"type":"object","properties":{"families":{"type":"integer"},"active_families":{"type":"integer"},"tutors":{"type":"integer"},"staff":{"type":"integer"},"all":{"type":"integer"}},"required":["families","active_families","tutors","staff","all"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"audience":{"type":"string","enum":["all","families","tutors","staff"]},"recipientCount":{"type":"integer"},"sentAt":{"type":"string","nullable":true},"sentByName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","body","audience","recipientCount","sentAt","sentByName","createdAt"],"additionalProperties":false}}},"required":["counts","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Send an announcement to an audience: an inbox item for each, email to those who opted in (emits TutorAnnouncementSent)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audience":{"type":"string","enum":["families","active_families","tutors","staff","all"]},"title":{"type":"string","minLength":2,"maxLength":80},"body":{"type":"string","minLength":2,"maxLength":300},"url":{"type":"string","maxLength":500,"pattern":"^(\\/|https?:\\/\\/)","nullable":true}},"required":["audience","title","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"sent":{"type":"integer"},"emailed":{"type":"integer"}},"required":["id","sent","emailed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/find/tutors":{"get":{"summary":"Find a tutor: the program’s tutors","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"subjectId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"methodologyId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tutors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"approaches":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"}},"required":["id","name","headline","bio","photoUrl","yearsExp","subjects","approaches","rating","reviewCount"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"methodologies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"canRequest":{"type":"boolean"}},"required":["tutors","subjects","methodologies","canRequest"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/find/tutors/{id}":{"get":{"summary":"A tutor’s profile: about, subjects, teaching approach, recent reviews","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"approaches":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"},"credentials":{"type":"string","nullable":true},"methodologies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"category":{"type":"string","enum":["reading","writing","math","executive_function","general"]},"description":{"type":"string","nullable":true}},"required":["id","name","shortName","category","description"],"additionalProperties":false}},"reviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rating":{"type":"integer"},"comment":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","rating","comment","createdAt"],"additionalProperties":false}},"weeklyHours":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer"},"startMin":{"type":"integer"},"endMin":{"type":"integer"}},"required":["dayOfWeek","startMin","endMin"],"additionalProperties":false}},"canRequest":{"type":"boolean"},"alreadyMatched":{"type":"boolean"},"pendingRequest":{"type":"boolean"}},"required":["id","name","headline","bio","photoUrl","yearsExp","subjects","approaches","rating","reviewCount","credentials","methodologies","reviews","weeklyHours","canRequest","alreadyMatched","pendingRequest"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/find/subjects":{"get":{"summary":"Subjects the program teaches, with the tutors who teach each","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["reading","writing","math","homework_help","academic_skills"]},"description":{"type":"string","nullable":true},"tutors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","category","description","tutors"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/find/subjects/{id}":{"get":{"summary":"One subject: what the program does, its tutors, family quotes","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["reading","writing","math","homework_help","academic_skills"]},"description":{"type":"string","nullable":true},"tutors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"approaches":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"}},"required":["id","name","headline","bio","photoUrl","yearsExp","subjects","approaches","rating","reviewCount"],"additionalProperties":false}},"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quote":{"type":"string"},"authorName":{"type":"string"},"studentFirstName":{"type":"string","nullable":true}},"required":["id","quote","authorName","studentFirstName"],"additionalProperties":false}}},"required":["id","name","category","description","tutors","quotes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/request-tutor/{id}":{"get":{"summary":"The request-a-tutor form","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tutor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"yearsExp":{"type":"integer"},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"approaches":{"type":"array","items":{"type":"string"}},"rating":{"type":"number","nullable":true},"reviewCount":{"type":"integer"}},"required":["id","name","headline","bio","photoUrl","yearsExp","subjects","approaches","rating","reviewCount"],"additionalProperties":false},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"}},"required":["id","name","gradeLevel"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"pending":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["studentId","createdAt"],"additionalProperties":false}}},"required":["tutor","students","subjects","pending"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/requests":{"post":{"summary":"Ask a tutor to take on your child (TutorRequestChanged; the tutor answers under Requests)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profileId":{"type":"string","minLength":1},"studentId":{"type":"string","minLength":1},"subjectId":{"type":"string","nullable":true},"message":{"type":"string","maxLength":4000,"nullable":true}},"required":["profileId","studentId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/inquire":{"get":{"summary":"The request-for-tutoring form","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"grades":{"type":"array","items":{"type":"string","enum":["K","1","2","3","4","5","6","7","8","9","10","11","12"]}},"prefill":{"type":"object","properties":{"parentName":{"type":"string"},"parentEmail":{"type":"string"},"parentPhone":{"type":"string","nullable":true}},"required":["parentName","parentEmail","parentPhone"],"additionalProperties":false},"children":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"inProgram":{"type":"boolean"}},"required":["personId","name","gradeLevel","inProgram"],"additionalProperties":false}},"isStaff":{"type":"boolean"}},"required":["subjects","grades","prefill","children","isStaff"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice":{"get":{"summary":"AI practice: lessons to practise for each child and recent attempts","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentFirstName":{"type":"string"},"lessonTitle":{"type":"string"},"startedAt":{"type":"string"},"completedSegments":{"type":"integer"},"totalSegments":{"type":"integer"},"status":{"type":"string","enum":["in_progress","complete","abandoned"]}},"required":["id","studentFirstName","lessonTitle","startedAt","completedSegments","totalSegments","status"],"additionalProperties":false}},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lessons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string"},"subjectName":{"type":"string"},"segmentCount":{"type":"integer"},"forStudent":{"type":"boolean"}},"required":["id","title","objective","subjectName","segmentCount","forStudent"],"additionalProperties":false}}},"required":["id","name","firstName","lessons"],"additionalProperties":false}}},"required":["recent","students"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice/start":{"post":{"summary":"Start (or resume) AI practice on a lesson for your child (TutorPracticeChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lessonId":{"type":"string","minLength":1},"studentId":{"type":"string","minLength":1}},"required":["lessonId","studentId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"resumed":{"type":"boolean"}},"required":["id","resumed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice/{id}":{"get":{"summary":"The practice player: segments, where the child is, the conversation","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete","abandoned"]},"lessonId":{"type":"string"},"lessonTitle":{"type":"string"},"subjectName":{"type":"string"},"objective":{"type":"string"},"studentId":{"type":"string"},"studentFirstName":{"type":"string"},"currentSegmentId":{"type":"string","nullable":true},"completedSegments":{"type":"integer"},"totalSegments":{"type":"integer"},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"durationSec":{"type":"integer"},"summary":{"type":"string","nullable":true},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"type":"integer"},"kind":{"type":"string","enum":["narrate","checkpoint","practice","recap"]},"title":{"type":"string"},"narration":{"type":"string"},"checkpointPrompt":{"type":"string","nullable":true},"practicePrompt":{"type":"string","nullable":true},"audioUrl":{"type":"string","nullable":true},"videoUrl":{"type":"string","nullable":true}},"required":["id","sortOrder","kind","title","narration","checkpointPrompt","practicePrompt","audioUrl","videoUrl"],"additionalProperties":false}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"segmentId":{"type":"string","nullable":true},"role":{"type":"string","enum":["student","ai","system"]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","segmentId","role","body","createdAt"],"additionalProperties":false}}},"required":["id","status","lessonId","lessonTitle","subjectName","objective","studentId","studentFirstName","currentSegmentId","completedSegments","totalSegments","startedAt","completedAt","durationSec","summary","segments","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice/{id}/chat":{"post":{"summary":"Your child writes to the AI practice tutor; it answers (tutoring:practice-reply:v1)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"segmentId":{"type":"string","minLength":1},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["segmentId","message"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"segmentId":{"type":"string","nullable":true},"role":{"type":"string","enum":["student","ai","system"]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","segmentId","role","body","createdAt"],"additionalProperties":false},"reply":{"type":"object","properties":{"id":{"type":"string"},"segmentId":{"type":"string","nullable":true},"role":{"type":"string","enum":["student","ai","system"]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","segmentId","role","body","createdAt"],"additionalProperties":false}},"required":["student","reply"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice/{id}/advance":{"post":{"summary":"Move to the next segment; the finished one is graded if it checks a skill (TutorPracticeChanged)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nextSegmentId":{"type":"string"},"completedSegments":{"type":"integer"}},"required":["nextSegmentId","completedSegments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/practice/{id}/complete":{"post":{"summary":"Finish the lesson: grade the last segment and write the summary the tutor reads (tutoring:practice-summary:v1)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["in_progress","complete","abandoned"]},"summary":{"type":"string","nullable":true}},"required":["status","summary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/lessons":{"get":{"summary":"Lesson plans assigned to your children (portal/lessons)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"}},"required":["id","firstName"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"durationMinutes":{"type":"integer"},"objective":{"type":"string"},"studentId":{"type":"string"},"studentFirstName":{"type":"string"},"authorName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","subjectName","gradeMin","gradeMax","durationMinutes","objective","studentId","studentFirstName","authorName","createdAt"],"additionalProperties":false}}},"required":["students","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/home":{"get":{"summary":"The family’s children (portal pickers)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"gradeLevel":{"type":"string"},"familyId":{"type":"string"}},"required":["id","name","firstName","gradeLevel","familyId"],"additionalProperties":false}},"familyNames":{"type":"array","items":{"type":"string"}}},"required":["students","familyNames"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/booking":{"get":{"summary":"What a family can book: their children’s active matches","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"matches":{"type":"array","items":{"type":"object","properties":{"enrollmentId":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectId":{"type":"string"},"subjectName":{"type":"string"},"weeklyHours":{"type":"string"}},"required":["enrollmentId","studentId","studentName","profileId","tutorName","subjectId","subjectName","weeklyHours"],"additionalProperties":false}},"sessionMinutes":{"type":"integer"},"maxRecurringWeeks":{"type":"integer"},"lateCancelHours":{"type":"integer"},"timezone":{"type":"string"}},"required":["enabled","matches","sessionMinutes","maxRecurringWeeks","lateCancelHours","timezone"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/sessions":{"post":{"summary":"Book a session (or a weekly run) in the tutor’s open hours (TutorSessionScheduled)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enrollmentId":{"type":"string","minLength":1},"startsAt":{"type":"string","minLength":1},"repeatWeeks":{"type":"integer","minimum":1,"maximum":12,"default":1}},"required":["enrollmentId","startsAt"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sessionIds":{"type":"array","items":{"type":"string"}},"created":{"type":"integer"},"skipped":{"type":"array","items":{"type":"object","properties":{"when":{"type":"string"},"reason":{"type":"string"}},"required":["when","reason"],"additionalProperties":false}}},"required":["sessionIds","created","skipped"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/sessions/{id}/reschedule":{"post":{"summary":"Move your child’s session within the tutor’s hours (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string","minLength":1},"scope":{"type":"string","enum":["one","series"],"default":"one"}},"required":["startsAt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"moved":{"type":"integer"}},"required":["moved"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/sessions/{id}/cancel":{"post":{"summary":"Cancel your child’s session; late inside the program’s window (TutorSessionChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000,"nullable":true},"scope":{"type":"string","enum":["one","series"],"default":"one"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"late":{"type":"boolean"},"canceled":{"type":"integer"}},"required":["late","canceled"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/sessions/{id}/prep":{"post":{"summary":"Send the tutor work ahead of a session (TutorSessionPrepSubmitted)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":8000,"default":""},"storageKey":{"type":"string","maxLength":500,"nullable":true},"fileName":{"type":"string","maxLength":255,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/sessions/{id}/review":{"get":{"summary":"Rate a completed session (review/[sessionId])","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sessionId":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"},"studentFirstName":{"type":"string"},"startsAt":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"canReview":{"type":"boolean"},"review":{"type":"object","properties":{"rating":{"type":"integer"},"comment":{"type":"string","nullable":true},"isPublic":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["rating","comment","isPublic","updatedAt"],"additionalProperties":false,"nullable":true}},"required":["sessionId","subjectName","tutorName","studentFirstName","startsAt","status","canReview","review"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save the family’s rating of a completed session (TutorReviewSaved)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":4000,"nullable":true},"isPublic":{"type":"boolean","default":true}},"required":["rating"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/lessons/{id}":{"get":{"summary":"A lesson plan assigned to your child (family view)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"durationMinutes":{"type":"integer"},"objective":{"type":"string"},"agenda":{"type":"string"},"materialsPlan":{"type":"string","nullable":true},"homeworkSuggestion":{"type":"string","nullable":true},"studentId":{"type":"string"},"studentName":{"type":"string"},"authorName":{"type":"string","nullable":true},"createdAt":{"type":"string"},"segmentCount":{"type":"integer"},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]}},"required":["id","title","kind"],"additionalProperties":false}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectName":{"type":"string"},"startsAt":{"type":"string"}},"required":["id","subjectName","startsAt"],"additionalProperties":false}}},"required":["id","title","subjectName","gradeMin","gradeMax","durationMinutes","objective","agenda","materialsPlan","homeworkSuggestion","studentId","studentName","authorName","createdAt","segmentCount","resources","sessions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/library/{id}":{"get":{"summary":"A material attached to your child’s homework, session or lesson plan","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["pdf","link","passage","problem_set","worksheet","video","doc"]},"subjectName":{"type":"string"},"gradeMin":{"type":"string"},"gradeMax":{"type":"string"},"url":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"hasFile":{"type":"boolean"},"fileType":{"type":"string","nullable":true}},"required":["id","title","description","kind","subjectName","gradeMin","gradeMax","url","content","hasFile","fileType"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/reports":{"get":{"summary":"Published progress reports for your children","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentFirstName":{"type":"string"},"tutorName":{"type":"string"},"periodLabel":{"type":"string"},"summary":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","studentId","studentFirstName","tutorName","periodLabel","summary","publishedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/diagnostics":{"get":{"summary":"Your children’s completed diagnostics","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentFirstName":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"administeredAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"summary":{"type":"string","nullable":true},"strengths":{"type":"string","nullable":true},"growthAreas":{"type":"string","nullable":true},"recommendedLevel":{"type":"string","nullable":true},"latestScorePct":{"type":"number","nullable":true}},"required":["id","studentId","studentFirstName","subjectName","status","administeredAt","createdAt","summary","strengths","growthAreas","recommendedLevel","latestScorePct"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/diagnostics/{id}":{"get":{"summary":"One diagnostic: score, section breakdown, strengths, growth areas, skills","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentFirstName":{"type":"string"},"subjectName":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"administeredAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"summary":{"type":"string","nullable":true},"strengths":{"type":"string","nullable":true},"growthAreas":{"type":"string","nullable":true},"recommendedLevel":{"type":"string","nullable":true},"latestScorePct":{"type":"number","nullable":true},"latest":{"type":"object","properties":{"id":{"type":"string"},"templateTitle":{"type":"string"},"status":{"type":"string","enum":["in_progress","complete"]},"scorePct":{"type":"number","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","templateTitle","status","scorePct","startedAt","completedAt"],"additionalProperties":false,"nullable":true},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"earned":{"type":"number"},"possible":{"type":"number"},"pct":{"type":"integer"}},"required":["name","earned","possible","pct"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string"},"earned":{"type":"number"},"possible":{"type":"number"},"pct":{"type":"integer"}},"required":["tag","earned","possible","pct"],"additionalProperties":false}},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateTitle":{"type":"string"},"scorePct":{"type":"number","nullable":true},"completedAt":{"type":"string","nullable":true},"purpose":{"type":"string"}},"required":["id","templateTitle","scorePct","completedAt","purpose"],"additionalProperties":false}}},"required":["id","studentId","studentFirstName","subjectName","status","administeredAt","createdAt","summary","strengths","growthAreas","recommendedLevel","latestScorePct","latest","sections","skills","history"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/hours":{"get":{"summary":"District-funded tutoring sessions: balance, allocations and every session drawn","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"balance":{"type":"object","properties":{"total":{"type":"integer"},"used":{"type":"integer"},"left":{"type":"integer"},"bookedAhead":{"type":"integer"}},"required":["total","used","left","bookedAhead"],"additionalProperties":false},"allocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentName":{"type":"string","nullable":true},"packageName":{"type":"string","nullable":true},"fundingSourceName":{"type":"string","nullable":true},"fundingSourceCode":{"type":"string","nullable":true},"sessionsTotal":{"type":"integer"},"sessionsUsed":{"type":"integer"},"status":{"type":"string","enum":["active","exhausted","revoked"]},"allocatedAt":{"type":"string"},"notes":{"type":"string","nullable":true}},"required":["id","studentName","packageName","fundingSourceName","fundingSourceCode","sessionsTotal","sessionsUsed","status","allocatedAt","notes"],"additionalProperties":false}},"draws":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"startsAt":{"type":"string"},"studentFirstName":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"},"sessionsDrawn":{"type":"integer"},"status":{"type":"string","enum":["drawn","unfunded","returned"]},"fundingSourceName":{"type":"string","nullable":true}},"required":["id","sessionId","startsAt","studentFirstName","subjectName","tutorName","sessionsDrawn","status","fundingSourceName"],"additionalProperties":false}},"monthly":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"label":{"type":"string"},"drawn":{"type":"integer"}},"required":["month","label","drawn"],"additionalProperties":false}},"openRequests":{"type":"integer"},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["balance","allocations","draws","monthly","openRequests","students"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/hours/request":{"post":{"summary":"Ask the program for more tutoring sessions (a request for tutoring the program office answers; TutorInquiryChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","minLength":1},"message":{"type":"string","minLength":5,"maxLength":4000}},"required":["studentId","message"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/family":{"get":{"summary":"Your family, your DEP contact details and your children in the program","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"families":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["inquiry","consultation","diagnostic","matched","active","paused","completed"]}},"required":["id","name","status"],"additionalProperties":false}},"guardian":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["name","email","phone"],"additionalProperties":false},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string"},"interests":{"type":"string","nullable":true},"goals":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"tutors":{"type":"array","items":{"type":"object","properties":{"subjectName":{"type":"string"},"tutorName":{"type":"string"},"profileId":{"type":"string"}},"required":["subjectName","tutorName","profileId"],"additionalProperties":false}}},"required":["id","name","gradeLevel","interests","goals","isActive","tutors"],"additionalProperties":false}}},"required":["families","guardian","students"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/students/{id}":{"get":{"summary":"One of your children: tutors, sessions, plans, homework, reports","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"gradeLevel":{"type":"string"},"interests":{"type":"string","nullable":true},"goals":{"type":"string","nullable":true},"tutors":{"type":"array","items":{"type":"object","properties":{"profileId":{"type":"string"},"tutorName":{"type":"string"},"subjectName":{"type":"string"},"headline":{"type":"string","nullable":true}},"required":["profileId","tutorName","subjectName","headline"],"additionalProperties":false}},"upcoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"}},"required":["id","startsAt","subjectName","tutorName"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string"},"subjectName":{"type":"string"},"tutorName":{"type":"string"},"status":{"type":"string","enum":["scheduled","in_progress","completed","canceled","no_show"]},"hasNote":{"type":"boolean"}},"required":["id","startsAt","subjectName","tutorName","status","hasNote"],"additionalProperties":false}},"lessons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectName":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","title","subjectName","createdAt"],"additionalProperties":false}},"lessonCount":{"type":"integer"},"homework":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"tutorName":{"type":"string"},"dueAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["assigned","submitted","complete"]}},"required":["id","title","tutorName","dueAt","status"],"additionalProperties":false}},"openHomework":{"type":"integer"},"plan":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"overview":{"type":"string"},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"measure":{"type":"string"},"progressPct":{"type":"integer"},"status":{"type":"string","enum":["in_progress","achieved","on_hold"]},"subjectName":{"type":"string"}},"required":["id","description","measure","progressPct","status","subjectName"],"additionalProperties":false}}},"required":["id","title","overview","goals"],"additionalProperties":false,"nullable":true},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"periodLabel":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","periodLabel","publishedAt"],"additionalProperties":false}}},"required":["id","name","firstName","gradeLevel","interests","goals","tutors","upcoming","recent","lessons","lessonCount","homework","openHomework","plan","reports"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update your child’s interests and goals for the tutor (TutorStudentChanged)","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interests":{"type":"string","maxLength":2000,"default":""},"goals":{"type":"string","maxLength":2000,"default":""}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/portal/students/{id}/timeline":{"get":{"summary":"Everything that happened for one child, newest first","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"studentId":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["session","report","homework","diagnostic","practice"]},"at":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"status":{"type":"string","nullable":true},"hasNote":{"type":"boolean"}},"required":["kind","at","id","title","detail","status"],"additionalProperties":false}}},"required":["studentId","name","firstName","events"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/preview/candidates":{"get":{"summary":"View as: tutors or families this admin can preview (busiest first; the first is the suggestion)","tags":["Omni Tutor"],"parameters":[{"schema":{"type":"string","enum":["tutor","family"]},"in":"query","name":"kind","required":true},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"kind":{"type":"string","enum":["tutor","family"]},"title":{"type":"string","nullable":true},"detail":{"type":"string"},"score":{"type":"integer"},"suggested":{"type":"boolean"}},"required":["memberId","name","email","kind","title","detail","score","suggested"],"additionalProperties":false}},"total":{"type":"integer"},"suggestedMemberId":{"type":"string","nullable":true}},"required":["rows","total","suggestedMemberId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tutoring/preview":{"post":{"summary":"View as: start (or switch) a read-only preview of one tutor’s or family’s Omni Tutor","tags":["Omni Tutor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"memberId":{"type":"string","minLength":1,"maxLength":64}},"required":["memberId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["tutor","family"]},"memberId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["TUTOR","PARENT"]},"startedAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["kind","memberId","name","role","startedAt","expiresAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"View as: end the preview (back to your own Omni Tutor)","tags":["Omni Tutor"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ended":{"type":"boolean"}},"required":["ended"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/study/context":{"get":{"summary":"My Smart Study Partner: your role, home and menu (enrols DEP students, parents, teachers and the first district admin)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"role":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"roleLabel":{"type":"string"},"home":{"type":"string","enum":["admin","district","teacher","parent","specialist","counselor","student"]},"title":{"type":"string","nullable":true},"isPlatform":{"type":"boolean"},"isDemo":{"type":"boolean"},"personId":{"type":"string","nullable":true},"dual":{"type":"boolean"},"band":{"type":"string","enum":["early","middle","independent"],"nullable":true},"bandLabel":{"type":"string","nullable":true},"vocabulary":{"type":"object","additionalProperties":{"type":"string"}},"menu":{"type":"object","additionalProperties":{"type":"boolean"}},"allowed":{"type":"object","additionalProperties":{"type":"boolean"}},"districtName":{"type":"string"},"isTrial":{"type":"boolean"},"enrolled":{"type":"string","enum":["bootstrap","auto"],"nullable":true},"displayName":{"type":"string","nullable":true}},"required":["role","roleLabel","home","title","isPlatform","isDemo","personId","dual","band","bandLabel","vocabulary","menu","allowed","districtName","isTrial","enrolled","displayName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/menu":{"get":{"summary":"My Smart Study Partner sidebar menu for the caller","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menu":{"type":"object","additionalProperties":{"type":"boolean"},"nullable":true}},"required":["menu"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/members":{"get":{"summary":"My Smart Study Partner members and their roles","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"in":"query","name":"role","required":false},{"schema":{"type":"string","enum":["staff","students","parents"]},"in":"query","name":"group","required":false},{"schema":{"type":"string","enum":["active","inactive","all"],"default":"all"},"in":"query","name":"active","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"personId":{"type":"string"},"userId":{"type":"string","nullable":true},"name":{"type":"string"},"email":{"type":"string","nullable":true},"personType":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"studyRole":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"title":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"source":{"type":"string"},"lastActiveAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["memberId","personId","userId","name","email","personType","gradeLevel","studyRole","title","isActive","source","lastActiveAt","createdAt"],"additionalProperties":false}},"total":{"type":"integer"},"byRole":{"type":"object","additionalProperties":{"type":"integer"}},"can":{"type":"object","properties":{"assign":{"type":"array","items":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]}},"deactivate":{"type":"boolean"}},"required":["assign","deactivate"],"additionalProperties":false}},"required":["rows","total","byRole","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a member or change their study role (emits StudyMemberChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","minLength":1,"maxLength":64},"studyRole":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"title":{"type":"string","maxLength":120,"nullable":true}},"required":["personId","studyRole"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/members/candidates":{"get":{"summary":"Find DEP people to add to My Smart Study Partner","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"personType":{"type":"string"},"jobTitle":{"type":"string","nullable":true},"hasLogin":{"type":"boolean"},"suggestedRole":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]}},"required":["personId","name","email","personType","jobTitle","hasLogin","suggestedRole"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/members/{id}/active":{"patch":{"summary":"Switch a member off or back on (emits StudyMemberChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/settings":{"get":{"summary":"My Smart Study Partner district settings","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"toolsEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"featuresEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"customBranding":{"type":"boolean"},"welcomeMessage":{"type":"string","nullable":true},"supportEmail":{"type":"string","nullable":true},"maintenanceMode":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"parentDigestEnabled":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["toolsEnabled","featuresEnabled","customBranding","welcomeMessage","supportEmail","maintenanceMode","aiEnabled","parentDigestEnabled","updatedAt"],"additionalProperties":false},"can":{"type":"object","properties":{"edit":{"type":"boolean"}},"required":["edit"],"additionalProperties":false}},"required":["settings","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Change the district settings (emits StudySettingsUpdated)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toolsEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"featuresEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"customBranding":{"type":"boolean"},"welcomeMessage":{"type":"string","maxLength":2000,"nullable":true},"supportEmail":{"type":"string","format":"email","maxLength":255,"nullable":true},"maintenanceMode":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"parentDigestEnabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"toolsEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"featuresEnabled":{"type":"object","additionalProperties":{"type":"boolean"}},"customBranding":{"type":"boolean"},"welcomeMessage":{"type":"string","nullable":true},"supportEmail":{"type":"string","nullable":true},"maintenanceMode":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"parentDigestEnabled":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["toolsEnabled","featuresEnabled","customBranding","welcomeMessage","supportEmail","maintenanceMode","aiEnabled","parentDigestEnabled","updatedAt"],"additionalProperties":false},"can":{"type":"object","properties":{"edit":{"type":"boolean"}},"required":["edit"],"additionalProperties":false}},"required":["settings","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/student":{"get":{"summary":"Student home (stats, progress, 14-day activity, tasks, today's stack)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"weeklyMinutes":{"type":"integer"},"streak":{"type":"integer"},"cardsMastered":{"type":"integer"},"quizAverage":{"type":"integer"},"quizCount":{"type":"integer"},"flashcardsDue":{"type":"integer"}},"required":["weeklyMinutes","streak","cardsMastered","quizAverage","quizCount","flashcardsDue"],"additionalProperties":false},"progress":{"type":"object","properties":{"level":{"type":"integer"},"xp":{"type":"integer"},"currentStreak":{"type":"integer"},"longestStreak":{"type":"integer"},"totalStudyMinutes":{"type":"integer"},"dailyChallengeCompleted":{"type":"boolean"},"achievements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"string","nullable":true},"description":{"type":"string"},"unlocked":{"type":"boolean"},"progress":{"type":"integer"}},"required":["id","title","icon","description","unlocked","progress"],"additionalProperties":false}},"achievementCount":{"type":"integer"},"achievementTotal":{"type":"integer"}},"required":["level","xp","currentStreak","longestStreak","totalStudyMinutes","dailyChallengeCompleted","achievements","achievementCount","achievementTotal"],"additionalProperties":false},"chart":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"minutes":{"type":"integer"}},"required":["date","minutes"],"additionalProperties":false}},"weakestSubject":{"type":"string","nullable":true},"upcomingTasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"dueDate":{"type":"string","nullable":true},"priority":{"type":"string"},"subject":{"type":"string","nullable":true},"subjectColor":{"type":"string","nullable":true}},"required":["id","title","dueDate","priority","subject","subjectColor"],"additionalProperties":false}},"stack":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["assignment","task"]},"id":{"type":"string"},"title":{"type":"string"},"context":{"type":"string"},"dueAt":{"type":"string"},"bucket":{"type":"string","enum":["overdue","today","soon"]},"priority":{"type":"integer"}},"required":["kind","id","title","context","dueAt","bucket","priority"],"additionalProperties":false}},"nudges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"},"detail":{"type":"string","nullable":true},"sentAt":{"type":"string"}},"required":["id","reason","detail","sentAt"],"additionalProperties":false}},"teamAssignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"teamColor":{"type":"string"},"title":{"type":"string"},"dueDate":{"type":"string"}},"required":["id","teamId","teamName","teamColor","title","dueDate"],"additionalProperties":false}},"teamCount":{"type":"integer"},"myTeams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"memberCount":{"type":"integer"}},"required":["id","name","color","memberCount"],"additionalProperties":false}},"checklist":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","title","completed"],"additionalProperties":false}},"assignments":{"type":"object","properties":{"done":{"type":"integer"},"total":{"type":"integer"}},"required":["done","total"],"additionalProperties":false},"band":{"type":"string","enum":["early","middle","independent"],"nullable":true}},"required":["stats","progress","chart","weakestSubject","upcomingTasks","stack","nudges","teamAssignments","teamCount","myTeams","checklist","assignments","band"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/teacher":{"get":{"summary":"Teacher home (classes, needs review, students to watch, due this week)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteCode":{"type":"string","nullable":true},"linkedToSection":{"type":"boolean"},"createdAt":{"type":"string"},"studentCount":{"type":"integer"},"assignmentCount":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"onTimeRate":{"type":"number","nullable":true}},"required":["id","name","inviteCode","linkedToSection","createdAt","studentCount","assignmentCount","avgScore","onTimeRate"],"additionalProperties":false}},"totals":{"type":"object","properties":{"classes":{"type":"integer"},"students":{"type":"integer"},"assignments":{"type":"integer"},"needsReview":{"type":"integer"}},"required":["classes","students","assignments","needsReview"],"additionalProperties":false},"studentsToWatch":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true}},"required":["id","name","classId","className","totalAssigned","completed","avgScore"],"additionalProperties":false}},"dueThisWeek":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"dueDate":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"}},"required":["id","title","type","dueDate","classId","className","totalAssigned","completed"],"additionalProperties":false}},"recentActivity":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"details":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["action","details","createdAt"],"additionalProperties":false}}},"required":["classes","totals","studentsToWatch","dueThisWeek","recentActivity"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/parent":{"get":{"summary":"Parent home (linked children, health, this week, activity)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"childId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"linkedVia":{"type":"string","enum":["dep_guardianship","invite_code"]},"linkedAt":{"type":"string"},"lastActive":{"type":"string","nullable":true},"streak":{"type":"integer"},"level":{"type":"integer"},"xp":{"type":"integer"},"totalStudyMinutes":{"type":"integer"}},"required":["id","linkId","name","gradeLevel","linkedVia","linkedAt","lastActive","streak","level","xp","totalStudyMinutes"],"additionalProperties":false}},"selected":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lastActive":{"type":"string","nullable":true}},"required":["id","name","lastActive"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["on_track","needs_attention","check_in"]},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false},"week":{"type":"object","properties":{"studyMinutes":{"type":"integer","nullable":true},"studyMinutesPrior":{"type":"integer","nullable":true},"quizCount":{"type":"integer","nullable":true},"quizAvg":{"type":"number","nullable":true},"quizAvgPrior":{"type":"number","nullable":true},"tasksCompleted":{"type":"integer","nullable":true},"tasksTotal":{"type":"integer","nullable":true},"streak":{"type":"integer","nullable":true},"longestStreak":{"type":"integer","nullable":true}},"required":["studyMinutes","studyMinutesPrior","quizCount","quizAvg","quizAvgPrior","tasksCompleted","tasksTotal","streak","longestStreak"],"additionalProperties":false},"activity":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["type","detail","at"],"additionalProperties":false}},"visibility":{"type":"object","properties":{"studySessions":{"type":"boolean"},"quizScores":{"type":"boolean"},"tasks":{"type":"boolean"},"gamification":{"type":"boolean"},"notes":{"type":"boolean"},"flashcards":{"type":"boolean"}},"required":["studySessions","quizScores","tasks","gamification","notes","flashcards"],"additionalProperties":false}},"required":["student","health","week","activity","visibility"],"additionalProperties":false,"nullable":true}},"required":["children","selected"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/specialist":{"get":{"summary":"Specialist caseload (logged to the FERPA audit log)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"scope":{"anyOf":[{"type":"string","enum":["full","academic","behavioral"]},{"type":"string"}]},"riskScore":{"type":"integer","nullable":true},"activeGoals":{"type":"integer"},"offTrackGoals":{"type":"integer"},"unresolvedMistakes":{"type":"integer"},"designation":{"anyOf":[{"type":"string","enum":["none","iep","504","ell"]},{"type":"string"}]},"depIep":{"type":"boolean"},"dep504":{"type":"boolean"}},"required":["id","name","email","gradeLevel","scope","riskScore","activeGoals","offTrackGoals","unresolvedMistakes","designation","depIep","dep504"],"additionalProperties":false}},"totals":{"type":"object","properties":{"students":{"type":"integer"},"atRisk":{"type":"integer"},"offTrackGoals":{"type":"integer"},"withIep":{"type":"integer"}},"required":["students","atRisk","offTrackGoals","withIep"],"additionalProperties":false},"triageGeneratedAt":{"type":"string","nullable":true}},"required":["students","totals","triageGeneratedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/district":{"get":{"summary":"District home (counts, schools, 14-day trend, teachers, at-risk, LinkIt)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalSchools":{"type":"integer"},"totalMembers":{"type":"integer"},"totalTeachers":{"type":"integer"},"totalStudents":{"type":"integer"},"totalParents":{"type":"integer"},"activeWeek":{"type":"integer"},"studyMinutes30d":{"type":"integer"}},"required":["totalSchools","totalMembers","totalTeachers","totalStudents","totalParents","activeWeek","studyMinutes30d"],"additionalProperties":false},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"students":{"type":"integer"},"teachers":{"type":"integer"}},"required":["id","name","students","teachers"],"additionalProperties":false}},"activityByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"logins":{"type":"integer"},"studyMinutes":{"type":"integer"},"completedAssignments":{"type":"integer"}},"required":["date","logins","studyMinutes","completedAssignments"],"additionalProperties":false}},"teacherEngagement":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"classes":{"type":"integer"},"students":{"type":"integer"},"assignments7d":{"type":"integer"},"lastAssignmentAt":{"type":"string","nullable":true}},"required":["id","name","email","classes","students","assignments7d","lastAssignmentAt"],"additionalProperties":false}},"atRisk":{"type":"object","properties":{"count":{"type":"integer"},"preview":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true}},"required":["id","name","totalAssigned","completed","avgScore"],"additionalProperties":false}}},"required":["count","preview"],"additionalProperties":false},"recentMembers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"studyRole":{"anyOf":[{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},{"type":"string"}]},"createdAt":{"type":"string"}},"required":["id","name","studyRole","createdAt"],"additionalProperties":false}},"linkit":{"type":"object","properties":{"connected":{"type":"boolean"},"lastSyncAt":{"type":"string","nullable":true},"pendingConflicts":{"type":"integer"}},"required":["connected","lastSyncAt","pendingConflicts"],"additionalProperties":false},"windowDays":{"type":"integer"}},"required":["stats","schools","activityByDay","teacherEngagement","atRisk","recentMembers","linkit","windowDays"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/admin":{"get":{"summary":"Admin home (members, growth, safety and support queues, activity)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalUsers":{"type":"integer"},"activeUsers7d":{"type":"integer"},"newToday":{"type":"integer"},"newWeek":{"type":"integer"},"newMonth":{"type":"integer"},"totalStudents":{"type":"integer"},"totalAdmins":{"type":"integer"},"flaggedMessages":{"type":"integer"},"totalEmails":{"type":"integer"},"failedEmails":{"type":"integer"},"openEscalations":{"type":"integer"},"openTickets":{"type":"integer"}},"required":["totalUsers","activeUsers7d","newToday","newWeek","newMonth","totalStudents","totalAdmins","flaggedMessages","totalEmails","failedEmails","openEscalations","openTickets"],"additionalProperties":false},"userGrowth":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}},"required":["date","count"],"additionalProperties":false}},"recentActivity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","name","action","details","createdAt"],"additionalProperties":false}}},"required":["stats","userGrowth","recentActivity"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/dashboard/counselor":{"get":{"summary":"Counselor queue summary","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"counts":{"type":"object","additionalProperties":{"type":"integer"}},"open":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"student":{"type":"string"},"triggerType":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","student","triggerType","severity","status","createdAt"],"additionalProperties":false}}},"required":["counts","open"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/subjects":{"get":{"summary":"My subjects","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"classroomCourseId":{"type":"string","nullable":true},"canvasCourseId":{"type":"string","nullable":true}},"required":["id","name","color","icon","classroomCourseId","canvasCourseId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a subject","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":20},"icon":{"type":"string","maxLength":50}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"classroomCourseId":{"type":"string","nullable":true},"canvasCourseId":{"type":"string","nullable":true}},"required":["id","name","color","icon","classroomCourseId","canvasCourseId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/subjects/{id}":{"patch":{"summary":"Rename or recolour a subject","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":20},"icon":{"type":"string","maxLength":50}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"classroomCourseId":{"type":"string","nullable":true},"canvasCourseId":{"type":"string","nullable":true}},"required":["id","name","color","icon","classroomCourseId","canvasCourseId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a subject (its notes, decks and tasks keep their content, untagged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/tasks":{"get":{"summary":"My planner tasks","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"classId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"priority":{"type":"string","enum":["high","medium","low"]},"completed":{"type":"boolean"},"classroomCourseworkId":{"type":"string","nullable":true},"canvasAssignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","subjectId","dueDate","priority","completed","classroomCourseworkId","canvasAssignmentId","createdAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a planner task","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"subjectId":{"type":"string","maxLength":64,"nullable":true},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time"}],"nullable":true},"priority":{"type":"string","enum":["high","medium","low"],"default":"medium"}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"priority":{"type":"string","enum":["high","medium","low"]},"completed":{"type":"boolean"},"classroomCourseworkId":{"type":"string","nullable":true},"canvasAssignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","subjectId","dueDate","priority","completed","classroomCourseworkId","canvasAssignmentId","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/tasks/{id}":{"patch":{"summary":"Edit, complete or reopen a planner task","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"subjectId":{"type":"string","maxLength":64,"nullable":true},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time"}],"nullable":true},"priority":{"type":"string","enum":["high","medium","low"]},"completed":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"priority":{"type":"string","enum":["high","medium","low"]},"completed":{"type":"boolean"},"classroomCourseworkId":{"type":"string","nullable":true},"canvasAssignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","title","subjectId","dueDate","priority","completed","classroomCourseworkId","canvasAssignmentId","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a planner task","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/sessions":{"get":{"summary":"My study sessions (focus timer, reviews, quizzes)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string","nullable":true},"durationMinutes":{"type":"integer"},"sessionDate":{"type":"string"},"type":{"type":"string","nullable":true}},"required":["id","subjectId","durationMinutes","sessionDate","type"],"additionalProperties":false}},"totalMinutes":{"type":"integer"}},"required":["rows","totalMinutes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Log a study session (the focus timer) — awards XP","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string","maxLength":64,"nullable":true},"durationMinutes":{"type":"integer","minimum":1,"maximum":600},"type":{"type":"string","enum":["focus","review","quiz"],"default":"focus"}},"required":["durationMinutes"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"sessionDate":{"type":"string"},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["id","sessionDate","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/study-plan":{"post":{"summary":"AI weekly study plan","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","minLength":1,"maxLength":500},"deadline":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"hoursPerDay":{"type":"integer","minimum":1,"maximum":8,"default":4}},"required":["goal"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string"},"aiCallId":{"type":"string","nullable":true}},"required":["plan","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notes":{"get":{"summary":"My notes","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":500},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subjectId":{"type":"string","nullable":true},"excerpt":{"type":"string"},"hasSummary":{"type":"boolean"},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","subjectId","excerpt","hasSummary","classroomMaterialId","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Save a new note — awards XP","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"content":{"type":"string","maxLength":500000},"subjectId":{"type":"string","maxLength":64,"nullable":true},"aiSummary":{"type":"string","maxLength":20000,"nullable":true},"keyConcepts":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":12,"nullable":true}},"required":["content"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"note":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"subjectId":{"type":"string","nullable":true},"aiSummary":{"type":"string","nullable":true},"keyConcepts":{"type":"array","items":{"type":"string"}},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","subjectId","aiSummary","keyConcepts","classroomMaterialId","createdAt","updatedAt"],"additionalProperties":false},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["note","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notes/{id}":{"get":{"summary":"One of my notes","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"subjectId":{"type":"string","nullable":true},"aiSummary":{"type":"string","nullable":true},"keyConcepts":{"type":"array","items":{"type":"string"}},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","subjectId","aiSummary","keyConcepts","classroomMaterialId","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a note","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"content":{"type":"string","maxLength":500000},"subjectId":{"type":"string","maxLength":64,"nullable":true},"aiSummary":{"type":"string","maxLength":20000,"nullable":true},"keyConcepts":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":12,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"note":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"subjectId":{"type":"string","nullable":true},"aiSummary":{"type":"string","nullable":true},"keyConcepts":{"type":"array","items":{"type":"string"}},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","subjectId","aiSummary","keyConcepts","classroomMaterialId","createdAt","updatedAt"],"additionalProperties":false},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["note","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a note","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notes/summarize":{"post":{"summary":"AI summary of note text (saved on the note when noteId is given)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":60000},"subjectId":{"type":"string","maxLength":64,"nullable":true},"noteId":{"type":"string","maxLength":64}},"required":["content"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"string"},"aiCallId":{"type":"string","nullable":true}},"required":["summary","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notes/concepts":{"post":{"summary":"AI key concepts (4–6) from note text (saved on the note when noteId is given)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":60000},"subjectId":{"type":"string","maxLength":64,"nullable":true},"noteId":{"type":"string","maxLength":64}},"required":["content"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"concepts":{"type":"array","items":{"type":"string"}},"aiCallId":{"type":"string","nullable":true}},"required":["concepts","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notes/flashcards":{"post":{"summary":"AI flashcards from note text → a new deck \"{title} - Flashcards\"","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":60000},"subjectId":{"type":"string","maxLength":64,"nullable":true},"noteId":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":500}},"required":["content"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deckId":{"type":"string"},"deckName":{"type":"string"},"count":{"type":"integer"},"aiCallId":{"type":"string","nullable":true}},"required":["deckId","deckName","count","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks":{"get":{"summary":"My flashcard decks (cards due, mastered)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subjectId":{"type":"string","nullable":true},"cardCount":{"type":"integer"},"dueCount":{"type":"integer"},"masteredCount":{"type":"integer"},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","name","subjectId","cardCount","dueCount","masteredCount","classroomMaterialId","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a deck (optionally with cards, e.g. from AI generation)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"subjectId":{"type":"string","maxLength":64,"nullable":true},"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","minLength":1,"maxLength":5000},"back":{"type":"string","minLength":1,"maxLength":5000},"difficulty":{"type":"string","enum":["easy","medium","hard"]}},"required":["front","back"],"additionalProperties":false},"maxItems":100}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks/{id}":{"get":{"summary":"One of my decks with its cards","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subjectId":{"type":"string","nullable":true},"classroomMaterialId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"interval":{"type":"integer"},"easeFactor":{"type":"number"},"repetitions":{"type":"integer"},"nextReview":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","front","back","difficulty","interval","easeFactor","repetitions","nextReview","createdAt"],"additionalProperties":false}}},"required":["id","name","subjectId","classroomMaterialId","createdAt","cards"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename a deck or change its subject","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"subjectId":{"type":"string","maxLength":64,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a deck and its cards","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks/{id}/cards":{"post":{"summary":"Add cards to a deck","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","minLength":1,"maxLength":5000},"back":{"type":"string","minLength":1,"maxLength":5000},"difficulty":{"type":"string","enum":["easy","medium","hard"]}},"required":["front","back"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["cards"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks/{id}/cards/{cardId}":{"patch":{"summary":"Edit a card","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"front":{"type":"string","minLength":1,"maxLength":5000},"back":{"type":"string","minLength":1,"maxLength":5000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"cardId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"interval":{"type":"integer"},"easeFactor":{"type":"number"},"repetitions":{"type":"integer"},"nextReview":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","front","back","difficulty","interval","easeFactor","repetitions","nextReview","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a card","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"cardId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks/{id}/cards/{cardId}/review":{"post":{"summary":"Rate a card Hard / Good / Easy (spaced repetition)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"string","enum":["hard","good","easy"]}},"required":["rating"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"cardId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"interval":{"type":"integer"},"easeFactor":{"type":"number"},"repetitions":{"type":"integer"},"nextReview":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","front","back","difficulty","interval","easeFactor","repetitions","nextReview","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/decks/{id}/review-session":{"post":{"summary":"Finish a study run: logs a review session and awards XP","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cardsReviewed":{"type":"integer","minimum":1,"maximum":1000},"durationMinutes":{"type":"integer","minimum":1,"maximum":600},"easy":{"type":"integer","minimum":0,"default":0},"good":{"type":"integer","minimum":0,"default":0},"hard":{"type":"integer","minimum":0,"default":0}},"required":["cardsReviewed","durationMinutes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sessionId":{"type":"string"},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["sessionId","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/flashcards/generate":{"post":{"summary":"AI flashcards for a topic (not saved until added)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":4000},"count":{"type":"integer","minimum":1,"maximum":20,"default":5}},"required":["topic"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string"},"back":{"type":"string"}},"required":["front","back"],"additionalProperties":false}},"aiCallId":{"type":"string","nullable":true}},"required":["cards","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/quiz-results":{"get":{"summary":"My quiz results","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"classId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string","nullable":true},"deckId":{"type":"string","nullable":true},"deckName":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"score":{"type":"number"},"totalQuestions":{"type":"integer"},"correctAnswers":{"type":"integer"},"percent":{"type":"integer"},"takenAt":{"type":"string"}},"required":["id","subjectId","deckId","deckName","topic","score","totalQuestions","correctAnswers","percent","takenAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Finish a quiz: save the result, log the quiz session, award XP","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["flashcard","ai-generated"]},"deckId":{"type":"string","maxLength":64,"nullable":true},"topic":{"type":"string","maxLength":255,"nullable":true},"subjectId":{"type":"string","maxLength":64,"nullable":true},"totalQuestions":{"type":"integer","minimum":1,"maximum":100},"correctAnswers":{"type":"integer","minimum":0,"maximum":100},"durationSeconds":{"type":"integer","minimum":0,"maximum":36000}},"required":["source","totalQuestions","correctAnswers","durationSeconds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"percent":{"type":"integer"},"sessionId":{"type":"string"},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["id","percent","sessionId","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/quiz/generate":{"post":{"summary":"AI quiz on a topic","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":4000},"count":{"type":"integer","minimum":1,"maximum":20,"default":5},"questionType":{"type":"string","enum":["multiple_choice","true_false","short_answer"],"default":"multiple_choice"}},"required":["topic"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"correctAnswer":{"type":"string"},"type":{"type":"string","enum":["multiple_choice","true_false","short_answer"]},"explanation":{"type":"string"}},"required":["question","correctAnswer","type"],"additionalProperties":false}},"aiCallId":{"type":"string","nullable":true}},"required":["questions","aiCallId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/quiz-attempts":{"post":{"summary":"Save quiz answers; wrong answers go to the Mistake Journal with an AI misconception tag","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quizSessionId":{"type":"string","maxLength":64},"attempts":{"type":"array","items":{"type":"object","properties":{"questionText":{"type":"string","minLength":1,"maxLength":5000},"studentAnswer":{"type":"string","maxLength":5000,"nullable":true},"correctAnswer":{"type":"string","maxLength":5000,"nullable":true},"isCorrect":{"type":"boolean"},"type":{"type":"string","enum":["multiple_choice","true_false","short_answer"]},"subject":{"type":"string","maxLength":100,"nullable":true},"topic":{"type":"string","maxLength":255,"nullable":true}},"required":["questionText","isCorrect"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["attempts"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isCorrect":{"type":"boolean"},"misconceptionTag":{"type":"string","nullable":true},"mistakeId":{"type":"string","nullable":true}},"required":["id","isCorrect","misconceptionTag","mistakeId"],"additionalProperties":false}},"wrongCount":{"type":"integer"},"taggedCount":{"type":"integer"}},"required":["attempts","wrongCount","taggedCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/analytics":{"get":{"summary":"My study analytics","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"overview":{"type":"object","properties":{"totalMinutes":{"type":"integer"},"sessionCount":{"type":"integer"},"level":{"type":"integer"},"xp":{"type":"integer"},"quizAverage":{"type":"integer"},"quizCount":{"type":"integer"},"cardsMastered":{"type":"integer"},"totalCards":{"type":"integer"}},"required":["totalMinutes","sessionCount","level","xp","quizAverage","quizCount","cardsMastered","totalCards"],"additionalProperties":false},"sessions":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"minutes":{"type":"integer"},"subjectId":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}},"required":["at","minutes","subjectId","type"],"additionalProperties":false}},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"quizzes":{"type":"array","items":{"type":"object","properties":{"takenAt":{"type":"string"},"percent":{"type":"integer"}},"required":["takenAt","percent"],"additionalProperties":false}},"decks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subjectId":{"type":"string","nullable":true},"total":{"type":"integer"},"mastered":{"type":"integer"},"due":{"type":"integer"}},"required":["id","name","subjectId","total","mastered","due"],"additionalProperties":false}},"achievements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"category":{"type":"string"},"unlockedAt":{"type":"string","nullable":true},"progress":{"type":"integer"},"target":{"type":"integer"},"current":{"type":"integer"}},"required":["id","name","description","icon","category","unlockedAt","progress","target","current"],"additionalProperties":false}}},"required":["overview","sessions","subjects","quizzes","decks","achievements"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/conversations":{"get":{"summary":"My AI assistant conversations (history drawer)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"firstMessage":{"type":"string","nullable":true},"messageCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","firstMessage","messageCount","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a new AI assistant conversation (emits StudyConversationChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Clear Chat: delete all my conversations and messages (emits StudyConversationChanged)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/conversations/{id}/messages":{"get":{"summary":"The messages of one of my conversations","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"conversationId":{"type":"string"},"title":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","role","content","createdAt"],"additionalProperties":false}}},"required":["conversationId","title","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/conversations/{id}":{"delete":{"summary":"Delete one of my conversations and its messages (emits StudyConversationChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/chat/context":{"get":{"summary":"Subject chips, Study Context panel and forced Patient mode for the assistant","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"subjectId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"activeSubject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false,"nullable":true},"relatedNotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"}},"required":["id","title","summary"],"additionalProperties":false}},"patientForced":{"type":"boolean"},"patientReason":{"type":"string","enum":["iep","504","band"],"nullable":true}},"required":["subjects","activeSubject","relatedNotes","patientForced","patientReason"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/chat":{"post":{"summary":"Send one message to the AI assistant (moderated; saves both messages)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","maxLength":64},"message":{"type":"string","minLength":1,"maxLength":8000},"subjectId":{"type":"string","maxLength":64},"patientMode":{"type":"boolean","default":false}},"required":["message"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"conversationId":{"type":"string"},"userMessage":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","role","content","createdAt"],"additionalProperties":false},"reply":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","role","content","createdAt"],"additionalProperties":false},"crisisResources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"phone":{"type":"string"},"text":{"type":"string"},"website":{"type":"string"}},"required":["name","description","phone","website"],"additionalProperties":false}},"warning":{"type":"string","nullable":true},"offTopic":{"type":"boolean"},"patientApplied":{"type":"boolean"}},"required":["conversationId","userMessage","reply","crisisResources","warning","offTopic","patientApplied"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/mistakes":{"get":{"summary":"My Mistake Journal","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["0","1","true","false"]},"in":"query","name":"includeResolved","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"anyOf":[{"type":"string","enum":["quiz","assignment","flashcard","manual","stuck"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"studentAnswer":{"type":"string","nullable":true},"correctAnswer":{"type":"string","nullable":true},"misconception":{"type":"string","nullable":true},"explanation":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","sourceType","subject","topic","question","studentAnswer","correctAnswer","misconception","explanation","resolvedAt","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Log a mistake in my journal (emits StudyMistakeChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceType":{"type":"string","enum":["manual","stuck"],"default":"manual"},"subject":{"type":"string","maxLength":100,"nullable":true},"topic":{"type":"string","maxLength":255,"nullable":true},"question":{"type":"string","maxLength":5000,"nullable":true},"studentAnswer":{"type":"string","maxLength":5000,"nullable":true},"correctAnswer":{"type":"string","maxLength":5000,"nullable":true},"misconception":{"type":"string","maxLength":5000,"nullable":true},"explanation":{"type":"string","maxLength":20000,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"anyOf":[{"type":"string","enum":["quiz","assignment","flashcard","manual","stuck"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"studentAnswer":{"type":"string","nullable":true},"correctAnswer":{"type":"string","nullable":true},"misconception":{"type":"string","nullable":true},"explanation":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","sourceType","subject","topic","question","studentAnswer","correctAnswer","misconception","explanation","resolvedAt","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/mistakes/{id}":{"patch":{"summary":"Mark a mistake resolved or unresolved (emits StudyMistakeChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"}},"required":["resolved"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"anyOf":[{"type":"string","enum":["quiz","assignment","flashcard","manual","stuck"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"studentAnswer":{"type":"string","nullable":true},"correctAnswer":{"type":"string","nullable":true},"misconception":{"type":"string","nullable":true},"explanation":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","sourceType","subject","topic","question","studentAnswer","correctAnswer","misconception","explanation","resolvedAt","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a mistake from my journal (emits StudyMistakeChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/catchup-plans":{"get":{"summary":"My catch-up plans","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"triggerSource":{"anyOf":[{"type":"string","enum":["mistakes","recent","absence","low_score","manual"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"durationMin":{"type":"integer"},"type":{"type":"string","enum":["read","recall","example","practice"]}},"required":["title","detail","durationMin","type"],"additionalProperties":false}},"totalMinutes":{"type":"integer"},"status":{"type":"string","enum":["new","started","completed","dismissed"]},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true}},"required":["id","triggerSource","subject","topic","title","summary","steps","totalMinutes","status","createdAt","startedAt","completedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Generate a catch-up plan from my recent mistakes (AI; emits StudyCatchupPlanChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":100},"topic":{"type":"string","maxLength":255},"mistakeIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"triggerSource":{"anyOf":[{"type":"string","enum":["mistakes","recent","absence","low_score","manual"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"durationMin":{"type":"integer"},"type":{"type":"string","enum":["read","recall","example","practice"]}},"required":["title","detail","durationMin","type"],"additionalProperties":false}},"totalMinutes":{"type":"integer"},"status":{"type":"string","enum":["new","started","completed","dismissed"]},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"aiGenerated":{"type":"boolean"}},"required":["id","triggerSource","subject","topic","title","summary","steps","totalMinutes","status","createdAt","startedAt","completedAt","aiGenerated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/catchup-plans/{id}":{"patch":{"summary":"Start, finish or dismiss a catch-up plan (emits StudyCatchupPlanChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","started","completed","dismissed"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"triggerSource":{"anyOf":[{"type":"string","enum":["mistakes","recent","absence","low_score","manual"]},{"type":"string"}]},"subject":{"type":"string","nullable":true},"topic":{"type":"string","nullable":true},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"durationMin":{"type":"integer"},"type":{"type":"string","enum":["read","recall","example","practice"]}},"required":["title","detail","durationMin","type"],"additionalProperties":false}},"totalMinutes":{"type":"integer"},"status":{"type":"string","enum":["new","started","completed","dismissed"]},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"aiGenerated":{"type":"boolean"}},"required":["id","triggerSource","subject","topic","title","summary","steps","totalMinutes","status","createdAt","startedAt","completedAt","aiGenerated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/rehearse":{"post":{"summary":"Get kind AI feedback on my explanation of a concept (moderated)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":100},"concept":{"type":"string","minLength":1,"maxLength":300},"explanation":{"type":"string","minLength":1,"maxLength":4000}},"required":["concept","explanation"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"feedback":{"type":"string"},"score":{"type":"integer","minimum":1,"maximum":5},"strengths":{"type":"array","items":{"type":"string"}},"gaps":{"type":"array","items":{"type":"string"}},"nextStep":{"type":"string"}},"required":["feedback","score","strengths","gaps","nextStep"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/stuck":{"post":{"summary":"I'm stuck: patient AI help (moderated; always saved; emits StudyHelpRequested)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"contextSubject":{"type":"string","maxLength":100},"contextTopic":{"type":"string","maxLength":255},"contextPage":{"type":"string","maxLength":255}},"required":["description"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"aiResponse":{"type":"string"},"crisisResources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"phone":{"type":"string"},"text":{"type":"string"},"website":{"type":"string"}},"required":["name","description","phone","website"],"additionalProperties":false}}},"required":["id","aiResponse","crisisResources"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/ask":{"get":{"summary":"My classes and the questions I asked them anonymously","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"topic":{"type":"string","nullable":true},"questionText":{"type":"string"},"teacherReply":{"type":"string","nullable":true},"repliedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","classId","className","topic","questionText","teacherReply","repliedAt","createdAt"],"additionalProperties":false}}},"required":["classes","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Ask my class teacher a question anonymously (moderated; emits StudyAnonQuestionChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"classId":{"type":"string","minLength":1,"maxLength":64},"topic":{"type":"string","maxLength":255},"questionText":{"type":"string","minLength":1,"maxLength":2000}},"required":["classId","questionText"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/ask/similar":{"get":{"summary":"How many other students in the class asked something similar (count only)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"classId","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"question","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"topic","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer"}},"required":["count"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/peer-match":{"get":{"summary":"My study-buddy opt-ins and suggestions","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"classId":{"type":"string"},"className":{"type":"string"},"canHelp":{"type":"boolean"},"needsHelp":{"type":"boolean"},"topics":{"type":"array","items":{"type":"string"}}},"required":["classId","className","canHelp","needsHelp","topics"],"additionalProperties":false}},"incoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"topic":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","classId","className","topic","status","createdAt"],"additionalProperties":false}},"outgoing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"topic":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","classId","className","topic","status","createdAt"],"additionalProperties":false}}},"required":["classes","incoming","outgoing"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Opt in or out of helping / being helped in a class (emits StudyPeerMatchChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"classId":{"type":"string","minLength":1,"maxLength":64},"canHelp":{"type":"boolean"},"needsHelp":{"type":"boolean"},"topics":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":10}},"required":["classId","canHelp","needsHelp"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/peer-match/{id}":{"patch":{"summary":"Accept, decline or complete a study-buddy suggestion (emits StudyPeerMatchChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted","declined","completed"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-classes":{"get":{"summary":"Classes I am in","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teacher":{"type":"string"},"joinedAt":{"type":"string"},"source":{"type":"string"},"studentCount":{"type":"integer"},"assignmentCount":{"type":"integer"},"classroomCourseId":{"type":"string","nullable":true}},"required":["id","name","teacher","joinedAt","source","studentCount","assignmentCount","classroomCourseId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-announcements":{"get":{"summary":"Announcements from my classes","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"senderName":{"type":"string"},"content":{"type":"string"},"messageType":{"type":"string"},"createdAt":{"type":"string"},"replyCount":{"type":"integer"}},"required":["id","classId","className","senderName","content","messageType","createdAt","replyCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-announcements/{id}/replies":{"get":{"summary":"Replies to an announcement","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"},"senderName":{"type":"string"},"mine":{"type":"boolean"},"isTeacher":{"type":"boolean"}},"required":["id","content","createdAt","senderName","mine","isTeacher"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Reply to an announcement","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":4000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"warning":{"type":"string"},"crisisResources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"phone":{"type":"string"},"text":{"type":"string"},"website":{"type":"string"}},"required":["name","description","phone","website"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classes/join":{"get":{"summary":"Look up a class by invite code","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":20,"default":""},"in":"query","name":"code","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teacher":{"type":"string"},"alreadyMember":{"type":"boolean"}},"required":["id","name","teacher","alreadyMember"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Join a class with its invite code","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":20}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classId":{"type":"string"},"className":{"type":"string"},"alreadyMember":{"type":"boolean"},"backfilled":{"type":"integer"}},"required":["classId","className","alreadyMember","backfilled"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments":{"get":{"summary":"My class assignments","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"dueDate":{"type":"string","nullable":true},"releaseAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","in_progress","completed"]},"score":{"type":"number","nullable":true},"completedAt":{"type":"string","nullable":true},"aiPolicy":{"type":"string"}},"required":["id","assignmentId","title","type","classId","className","dueDate","releaseAt","status","score","completedAt","aiPolicy"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments/{id}":{"get":{"summary":"One of my assignments (work view)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"dueDate":{"type":"string","nullable":true},"releaseAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","in_progress","completed"]},"score":{"type":"number","nullable":true},"attempts":{"type":"integer"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"teacherReviewed":{"type":"boolean"},"teacherNotes":{"type":"string"},"timeExceeded":{"type":"boolean"},"timeLimitMinutes":{"type":"integer","nullable":true},"studentBudgetMinutes":{"type":"number","nullable":true},"accommodations":{"type":"object","properties":{"extendedTimePct":{"type":"integer"},"reducedAnswerChoices":{"type":"integer"},"needsAudio":{"type":"boolean"},"simplifiedLanguage":{"type":"boolean"},"designation":{"type":"string"}},"required":["extendedTimePct","reducedAnswerChoices","needsAudio","simplifiedLanguage","designation"],"additionalProperties":false},"tierSetId":{"type":"string","nullable":true},"servedTier":{"type":"string","nullable":true},"aiPolicy":{"type":"string","enum":["allowed","cited","disallowed"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["quiz","flashcard_deck"]},"title":{"type":"string"},"orderIndex":{"type":"integer"},"weight":{"type":"number"},"content":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"type":{"type":"string","enum":["multiple_choice","true_false","short_answer"]},"options":{"type":"array","items":{"type":"string"}},"maxScore":{"type":"number"}},"required":["question","type","options","maxScore"],"additionalProperties":false}},"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string"},"back":{"type":"string"}},"required":["front","back"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","type","title","orderIndex","weight","content"],"additionalProperties":false}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer"}},"required":["id","filename","mime","size"],"additionalProperties":false}},"results":{"type":"object","properties":{"score":{"type":"number","nullable":true},"total":{"type":"integer"},"correct":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"type":{"type":"string"},"userAnswer":{"type":"string"},"correctAnswer":{"type":"string"},"correct":{"type":"boolean","nullable":true},"score":{"type":"number"},"maxScore":{"type":"number"},"feedback":{"type":"string","nullable":true},"aiConfidence":{"type":"number","nullable":true},"explanation":{"type":"string"}},"required":["question","type","userAnswer","correctAnswer","correct","score","maxScore","feedback","aiConfidence","explanation"],"additionalProperties":false}}},"required":["score","total","correct","results"],"additionalProperties":false,"nullable":true}},"required":["id","assignmentId","title","description","type","classId","className","dueDate","releaseAt","status","score","attempts","startedAt","completedAt","teacherReviewed","teacherNotes","timeExceeded","timeLimitMinutes","studentBudgetMinutes","accommodations","tierSetId","servedTier","aiPolicy","items","attachments","results"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments/{id}/start":{"post":{"summary":"Start an assignment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","completed"]},"startedAt":{"type":"string","nullable":true}},"required":["status","startedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments/{id}/submit":{"post":{"summary":"Turn in an assignment (graded)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","maxLength":64},"answers":{"type":"array","items":{"type":"object","properties":{"questionIndex":{"type":"integer","minimum":0,"maximum":500},"answer":{"type":"string","maxLength":5000}},"required":["questionIndex","answer"],"additionalProperties":false},"maxItems":500},"deckCompleted":{"type":"boolean"}},"required":["itemId"],"additionalProperties":false},"maxItems":50}},"required":["items"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"score":{"type":"number"},"total":{"type":"integer"},"correct":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"type":{"type":"string"},"userAnswer":{"type":"string"},"correctAnswer":{"type":"string"},"correct":{"type":"boolean","nullable":true},"score":{"type":"number"},"maxScore":{"type":"number"},"feedback":{"type":"string","nullable":true},"aiConfidence":{"type":"number","nullable":true},"explanation":{"type":"string"}},"required":["question","type","userAnswer","correctAnswer","correct","score","maxScore","feedback","aiConfidence","explanation"],"additionalProperties":false}},"timeExceeded":{"type":"boolean"},"pendingReview":{"type":"boolean"},"mistakesAdded":{"type":"integer"},"award":{"type":"object","properties":{"gained":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"levelUp":{"type":"boolean"},"unlocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dailyChallenge":{"type":"boolean"},"streak":{"type":"integer"}},"required":["gained","xp","level","levelUp","unlocked","dailyChallenge","streak"],"additionalProperties":false,"nullable":true}},"required":["score","total","correct","results","timeExceeded","pendingReview","mistakesAdded","award"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments/{id}/complete":{"post":{"summary":"Mark a reading assignment complete","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","completed"]}},"required":["status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/my-assignments/{id}/events":{"post":{"summary":"Save writing-process drafts and events","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"drafts":{"type":"array","items":{},"maxItems":500},"events":{"type":"array","items":{},"maxItems":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"draftsSaved":{"type":"integer"},"eventsSaved":{"type":"integer"}},"required":["ok","draftsSaved","eventsSaved"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"423":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/me/preferences":{"put":{"summary":"Save my study preferences (emits StudyPreferencesChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","maxLength":255,"nullable":true},"dailyStudyGoal":{"type":"integer","minimum":5,"maximum":1440},"preferredSessionLength":{"type":"integer","minimum":5,"maximum":180},"theme":{"type":"string","enum":["light","dark"]},"locale":{"type":"string","enum":["en","es","fr","th"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/me/compliance":{"get":{"summary":"My consent and onboarding state","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ageGroup":{"type":"string","enum":["under13","minor","adult"],"nullable":true},"dateOfBirth":{"type":"string","nullable":true},"ageVerifiedAt":{"type":"string","nullable":true},"parentEmail":{"type":"string","nullable":true},"parentalConsentStatus":{"type":"string"},"parentalConsentAt":{"type":"string","nullable":true},"parentalConsentRequired":{"type":"boolean"},"guardianEmails":{"type":"array","items":{"type":"string"}},"termsAccepted":{"type":"boolean"},"termsVersion":{"type":"string","nullable":true},"termsAcceptedAt":{"type":"string","nullable":true},"privacyAccepted":{"type":"boolean"},"privacyVersion":{"type":"string","nullable":true},"privacyAcceptedAt":{"type":"string","nullable":true},"storageConsentResponded":{"type":"boolean"},"storageAnalytics":{"type":"boolean"},"storageAiProcessing":{"type":"boolean"},"storageConsentAt":{"type":"string","nullable":true},"aiConsented":{"type":"boolean"},"aiConsentedAt":{"type":"string","nullable":true},"onboardingComplete":{"type":"boolean"},"isStudent":{"type":"boolean"}},"required":["ageGroup","dateOfBirth","ageVerifiedAt","parentEmail","parentalConsentStatus","parentalConsentAt","parentalConsentRequired","guardianEmails","termsAccepted","termsVersion","termsAcceptedAt","privacyAccepted","privacyVersion","privacyAcceptedAt","storageConsentResponded","storageAnalytics","storageAiProcessing","storageConsentAt","aiConsented","aiConsentedAt","onboardingComplete","isStudent"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Accept terms, answer storage/AI consent, finish onboarding (emits StudyComplianceChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"termsAccepted":{"type":"boolean"},"privacyAccepted":{"type":"boolean"},"storageAnalytics":{"type":"boolean"},"storageAiProcessing":{"type":"boolean"},"aiConsented":{"type":"boolean"},"onboardingComplete":{"type":"boolean"},"parentEmail":{"type":"string","format":"email","maxLength":255}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent-invite":{"get":{"summary":"My parent invite code","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"expired":{"type":"boolean"}},"required":["code","expiresAt","expired"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Make (or reuse) my 7-day parent invite code (emits StudyParentLinkChanged)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"expired":{"type":"boolean"}},"required":["code","expiresAt","expired"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/nudges/{id}":{"patch":{"summary":"Dismiss or act on one of my nudges (emits StudyNudgeChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["dismiss","act"]}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/me/export":{"get":{"summary":"Export my own study data (JSON)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/nudges":{"get":{"summary":"My nudges (self level only — teacher/counselor tiers are internal, as in the app)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"level":{"type":"string","enum":["self","teacher","counselor"]},"reason":{"type":"string"},"detail":{"type":"string","nullable":true},"sentAt":{"type":"string"}},"required":["id","level","reason","detail","sentAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/me/profile":{"get":{"summary":"My preferences, XP and consent state","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"preferences":{"type":"object","properties":{"displayName":{"type":"string","nullable":true},"dailyStudyGoal":{"type":"integer"},"preferredSessionLength":{"type":"integer"},"theme":{"type":"string","enum":["light","dark"]},"locale":{"type":"string","enum":["en","es","fr","th"]}},"required":["displayName","dailyStudyGoal","preferredSessionLength","theme","locale"],"additionalProperties":false},"gamification":{"type":"object","properties":{"xp":{"type":"integer"},"level":{"type":"integer"},"currentStreak":{"type":"integer"},"longestStreak":{"type":"integer"},"totalStudyMinutes":{"type":"integer"},"totalNotesCreated":{"type":"integer"},"totalCardsReviewed":{"type":"integer"},"totalQuizzesTaken":{"type":"integer"},"totalFocusSessions":{"type":"integer"}},"required":["xp","level","currentStreak","longestStreak","totalStudyMinutes","totalNotesCreated","totalCardsReviewed","totalQuizzesTaken","totalFocusSessions"],"additionalProperties":false},"compliance":{"type":"object","properties":{"ageGroup":{"type":"string","nullable":true},"parentalConsentStatus":{"type":"string"},"termsAccepted":{"type":"boolean"},"privacyAccepted":{"type":"boolean"},"storageConsentResponded":{"type":"boolean"},"aiConsented":{"type":"boolean"},"onboardingComplete":{"type":"boolean"}},"required":["ageGroup","parentalConsentStatus","termsAccepted","privacyAccepted","storageConsentResponded","aiConsented","onboardingComplete"],"additionalProperties":false},"band":{"type":"string","enum":["early","middle","independent"],"nullable":true},"supports":{"type":"object","properties":{"readAloud":{"type":"boolean"},"simplifiedLanguage":{"type":"boolean"},"patientDefault":{"type":"boolean"},"reducedAnswerChoices":{"type":"integer"},"extendedTimePct":{"type":"integer"},"designation":{"type":"string"},"aiAvailable":{"type":"boolean"},"aiDistrictEnabled":{"type":"boolean"},"aiConsented":{"type":"boolean"},"onboardingComplete":{"type":"boolean"}},"required":["readAloud","simplifiedLanguage","patientDefault","reducedAnswerChoices","extendedTimePct","designation","aiAvailable","aiDistrictEnabled","aiConsented","onboardingComplete"],"additionalProperties":false}},"required":["preferences","gamification","compliance","band","supports"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams":{"get":{"summary":"My study teams","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"inviteCode":{"type":"string"},"maxMembers":{"type":"integer"},"memberCount":{"type":"integer"},"myRole":{"type":"string","enum":["owner","admin","member"]},"createdAt":{"type":"string"}},"required":["id","name","description","color","inviteCode","maxMembers","memberCount","myRole","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a study team (the creator is its owner)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000,"nullable":true},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"inviteCode":{"type":"string"},"maxMembers":{"type":"integer"},"memberCount":{"type":"integer"},"myRole":{"type":"string","enum":["owner","admin","member"]},"createdAt":{"type":"string"}},"required":["id","name","description","color","inviteCode","maxMembers","memberCount","myRole","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/join":{"post":{"summary":"Join a team with its 8-character invite code","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"inviteCode":{"type":"string","minLength":4,"maxLength":20}},"required":["inviteCode"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"inviteCode":{"type":"string"},"maxMembers":{"type":"integer"},"memberCount":{"type":"integer"},"myRole":{"type":"string","enum":["owner","admin","member"]},"createdAt":{"type":"string"}},"required":["id","name","description","color","inviteCode","maxMembers","memberCount","myRole","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}":{"get":{"summary":"A team (members only)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"inviteCode":{"type":"string"},"maxMembers":{"type":"integer"},"memberCount":{"type":"integer"},"myRole":{"type":"string","enum":["owner","admin","member"]},"createdAt":{"type":"string"},"ownerPersonId":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","color","inviteCode","maxMembers","memberCount","myRole","createdAt","ownerPersonId","updatedAt"],"additionalProperties":false},"myRole":{"type":"string","enum":["owner","admin","member"]},"mePersonId":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"},"isMe":{"type":"boolean"}},"required":["personId","name","role","joinedAt","isMe"],"additionalProperties":false}}},"required":["team","myRole","mePersonId","members"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit team information (owner or admin)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000,"nullable":true},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"inviteCode":{"type":"string"},"maxMembers":{"type":"integer"},"memberCount":{"type":"integer"},"myRole":{"type":"string","enum":["owner","admin","member"]},"createdAt":{"type":"string"}},"required":["id","name","description","color","inviteCode","maxMembers","memberCount","myRole","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete the team and all shared content (owner)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/leave":{"post":{"summary":"Leave the team (not the owner)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/invite":{"post":{"summary":"Invite by email (owner or admin)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string","enum":["added","already_member","pending"]},"message":{"type":"string"}},"required":["ok","status","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/members":{"get":{"summary":"Team members","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"},"isMe":{"type":"boolean"}},"required":["personId","name","role","joinedAt","isMe"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/members/{personId}":{"patch":{"summary":"Change a member’s team role (owner or admin)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["admin","member"]}},"required":["role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":191},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"},"isMe":{"type":"boolean"}},"required":["personId","name","role","joinedAt","isMe"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a member (owner or admin)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":191},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string"},"isMe":{"type":"boolean"}},"required":["personId","name","role","joinedAt","isMe"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/activity":{"get":{"summary":"Team activity (latest 50)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"description":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","personId","name","action","details","description","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/stats":{"get":{"summary":"Team stats and XP leaderboard","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"memberCount":{"type":"integer"},"totalAssignments":{"type":"integer"},"completedAssignments":{"type":"integer"},"leaderboard":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"xp":{"type":"integer"},"level":{"type":"integer"}},"required":["personId","name","xp","level"],"additionalProperties":false}}},"required":["memberCount","totalAssignments","completedAssignments","leaderboard"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/notes":{"get":{"summary":"Team notes","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","authorPersonId","authorName","canDelete","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a team note","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"content":{"type":"string","maxLength":500000,"default":""}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","authorPersonId","authorName","canDelete","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/notes/{noteId}":{"patch":{"summary":"Edit a team note","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"content":{"type":"string","maxLength":500000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"noteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","authorPersonId","authorName","canDelete","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a team note (author, owner or admin)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"noteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/decks":{"get":{"summary":"Team flashcard decks with their cards","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"createdAt":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"}},"required":["id","front","back"],"additionalProperties":false}}},"required":["id","name","authorPersonId","authorName","createdAt","cards"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a team deck","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","minLength":1,"maxLength":5000},"back":{"type":"string","minLength":1,"maxLength":5000}},"required":["front","back"],"additionalProperties":false},"maxItems":200}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"createdAt":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"}},"required":["id","front","back"],"additionalProperties":false}}},"required":["id","name","authorPersonId","authorName","createdAt","cards"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/decks/{deckId}":{"delete":{"summary":"Delete a team deck","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"deckId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/decks/{deckId}/cards":{"post":{"summary":"Add a card to a team deck","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"front":{"type":"string","minLength":1,"maxLength":5000},"back":{"type":"string","minLength":1,"maxLength":5000}},"required":["front","back"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"deckId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string"},"back":{"type":"string"}},"required":["id","front","back"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/decks/{deckId}/cards/{cardId}":{"delete":{"summary":"Delete a card from a team deck","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"deckId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"cardId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/assignments":{"get":{"summary":"Team assignments with completion progress","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"createdByPersonId":{"type":"string"},"createdAt":{"type":"string"},"completionCount":{"type":"integer"},"completedBy":{"type":"array","items":{"type":"string"}},"myCompleted":{"type":"boolean"}},"required":["id","title","description","dueDate","createdByPersonId","createdAt","completionCount","completedBy","myCompleted"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a team assignment","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000,"nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"createdByPersonId":{"type":"string"},"createdAt":{"type":"string"},"completionCount":{"type":"integer"},"completedBy":{"type":"array","items":{"type":"string"}},"myCompleted":{"type":"boolean"}},"required":["id","title","description","dueDate","createdByPersonId","createdAt","completionCount","completedBy","myCompleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/assignments/{aid}":{"patch":{"summary":"Edit a team assignment","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000,"nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"aid","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"createdByPersonId":{"type":"string"},"createdAt":{"type":"string"},"completionCount":{"type":"integer"},"completedBy":{"type":"array","items":{"type":"string"}},"myCompleted":{"type":"boolean"}},"required":["id","title","description","dueDate","createdByPersonId","createdAt","completionCount","completedBy","myCompleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a team assignment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"aid","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/assignments/{aid}/complete":{"post":{"summary":"Mark a team assignment complete for me","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"aid","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"createdByPersonId":{"type":"string"},"createdAt":{"type":"string"},"completionCount":{"type":"integer"},"completedBy":{"type":"array","items":{"type":"string"}},"myCompleted":{"type":"boolean"}},"required":["id","title","description","dueDate","createdByPersonId","createdAt","completionCount","completedBy","myCompleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/discussions":{"get":{"summary":"Team discussion (top-level messages with their replies)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"parentId":{"type":"string","nullable":true},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"parentId":{"type":"string","nullable":true},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","content","authorPersonId","authorName","parentId","canDelete","createdAt"],"additionalProperties":false}}},"required":["id","content","authorPersonId","authorName","parentId","canDelete","createdAt","replies"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Post a message or a reply","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"parentId":{"type":"string","maxLength":64,"nullable":true}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorPersonId":{"type":"string"},"authorName":{"type":"string"},"parentId":{"type":"string","nullable":true},"canDelete":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","content","authorPersonId","authorName","parentId","canDelete","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teams/{id}/discussions/{msgId}":{"delete":{"summary":"Delete a message (author, owner or admin)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"msgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes":{"get":{"summary":"Classes I teach","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteCode":{"type":"string","nullable":true},"sectionId":{"type":"string","nullable":true},"sectionName":{"type":"string","nullable":true},"studentCount":{"type":"integer"},"assignmentCount":{"type":"integer"},"archived":{"type":"boolean"},"methods":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"required":["slug","name","role"],"additionalProperties":false}},"createdAt":{"type":"string"},"classroomCourseId":{"type":"string","nullable":true},"canvasCourseId":{"type":"string","nullable":true}},"required":["id","name","inviteCode","sectionId","sectionName","studentCount","assignmentCount","archived","methods","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a class (optionally mirroring a DEP section)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"sectionId":{"type":"string","maxLength":64,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteCode":{"type":"string"},"roster":{"type":"object","properties":{"sectionId":{"type":"string","nullable":true},"added":{"type":"integer"},"reactivated":{"type":"integer"},"removed":{"type":"integer"},"backfilled":{"type":"integer"},"total":{"type":"integer"}},"required":["sectionId","added","reactivated","removed","backfilled","total"],"additionalProperties":false,"nullable":true}},"required":["id","name","inviteCode","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/sections":{"get":{"summary":"DEP sections I teach, for linking a class","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sectionCode":{"type":"string"},"courseName":{"type":"string"},"termName":{"type":"string"},"studentCount":{"type":"integer"},"linkedClassId":{"type":"string","nullable":true},"linkedClassName":{"type":"string","nullable":true}},"required":["id","name","sectionCode","courseName","termName","studentCount","linkedClassId","linkedClassName"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}":{"get":{"summary":"A class I teach (syncs a DEP-section roster)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteCode":{"type":"string","nullable":true},"sectionId":{"type":"string","nullable":true},"sectionName":{"type":"string","nullable":true},"studentCount":{"type":"integer"},"assignmentCount":{"type":"integer"},"archived":{"type":"boolean"},"methods":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"required":["slug","name","role"],"additionalProperties":false}},"createdAt":{"type":"string"},"classroomCourseId":{"type":"string","nullable":true},"canvasCourseId":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"sectionCode":{"type":"string","nullable":true},"sectionTerm":{"type":"string","nullable":true},"materialCount":{"type":"integer"},"libraryCount":{"type":"integer"},"messageCount":{"type":"integer"},"hasPrimaryMethod":{"type":"boolean"},"roster":{"type":"object","properties":{"sectionId":{"type":"string","nullable":true},"added":{"type":"integer"},"reactivated":{"type":"integer"},"removed":{"type":"integer"},"backfilled":{"type":"integer"},"total":{"type":"integer"}},"required":["sectionId","added","reactivated","removed","backfilled","total"],"additionalProperties":false,"nullable":true}},"required":["id","name","inviteCode","sectionId","sectionName","studentCount","assignmentCount","archived","methods","createdAt","archivedAt","sectionCode","sectionTerm","materialCount","libraryCount","messageCount","hasPrimaryMethod","roster"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename, link a DEP section, archive or restore a class","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"sectionId":{"type":"string","maxLength":64,"nullable":true},"archived":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sectionId":{"type":"string","nullable":true},"added":{"type":"integer"},"reactivated":{"type":"integer"},"removed":{"type":"integer"},"backfilled":{"type":"integer"},"total":{"type":"integer"}},"required":["sectionId","added","reactivated","removed","backfilled","total"],"additionalProperties":false,"nullable":true},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a class and everything in it","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/roster-sync":{"post":{"summary":"Sync a class roster from its DEP section","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sectionId":{"type":"string","nullable":true},"added":{"type":"integer"},"reactivated":{"type":"integer"},"removed":{"type":"integer"},"backfilled":{"type":"integer"},"total":{"type":"integer"}},"required":["sectionId","added","reactivated","removed","backfilled","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/students":{"get":{"summary":"A class roster with this week's study time","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"lastActiveAt":{"type":"string","nullable":true},"joinedAt":{"type":"string"},"source":{"type":"string"},"recentSessions":{"type":"integer"},"recentMinutes":{"type":"integer"},"streak":{"type":"integer","nullable":true}},"required":["id","name","email","gradeLevel","lastActiveAt","joinedAt","source","recentSessions","recentMinutes","streak"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teaching-methods":{"get":{"summary":"The teaching-method catalogue","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"}},"required":["id","slug","displayName","description"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/teaching-methods":{"get":{"summary":"A class's AI teaching method","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"primary":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"}},"required":["id","slug","displayName"],"additionalProperties":false,"nullable":true},"supporting":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"}},"required":["id","slug","displayName"],"additionalProperties":false}}},"required":["primary","supporting"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Set a class's AI teaching method","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"primary":{"type":"string","minLength":1,"maxLength":64},"supporting":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":2,"default":[]}},"required":["primary"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"primary":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"}},"required":["id","slug","displayName"],"additionalProperties":false,"nullable":true},"supporting":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"}},"required":["id","slug","displayName"],"additionalProperties":false}}},"required":["primary","supporting"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/materials":{"get":{"summary":"A class's source materials","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceType":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"textLength":{"type":"integer"},"libraryCount":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","title","sourceType","sourceUrl","textLength","libraryCount","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a material from text, a URL or a Canva design","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255,"default":""},"sourceType":{"type":"string","enum":["text","url","canva"]},"text":{"type":"string","maxLength":500000},"url":{"type":"string","maxLength":2000},"canvaDesignId":{"type":"string","maxLength":100}},"required":["sourceType"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceType":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"textLength":{"type":"integer"}},"required":["id","title","sourceType","sourceUrl","textLength"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/materials/{materialId}":{"get":{"summary":"One material with its text","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"materialId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceType":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"textLength":{"type":"integer"},"libraryCount":{"type":"integer"},"createdAt":{"type":"string"},"extractedText":{"type":"string"}},"required":["id","title","sourceType","sourceUrl","textLength","libraryCount","createdAt","extractedText"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a material (library items made from it stay)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"materialId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/materials/upload":{"post":{"summary":"Add a material from an uploaded file (text is extracted; the file is not kept)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceType":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"textLength":{"type":"integer"}},"required":["id","title","sourceType","sourceUrl","textLength"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/generate":{"post":{"summary":"Generate a flashcard deck and/or a quiz from a material (AI)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"materialId":{"type":"string","minLength":1,"maxLength":64},"flashcards":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":100,"default":15}},"additionalProperties":false},"quiz":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":100,"default":10},"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","mixed","mixed_with_short_answer"],"default":"multiple_choice"}},"additionalProperties":false}},"required":["materialId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"flashcardDeck":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true}}},"required":["cards"],"additionalProperties":false},"quiz":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true}}},"required":["questions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/library":{"get":{"summary":"A class library (quizzes and decks)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"integer"},"updatedAt":{"type":"string"},"className":{"type":"string"},"materialId":{"type":"string","nullable":true},"materialTitle":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"assignmentCount":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","classId","type","title","status","itemCount","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Save a quiz or deck to the class library","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"materialId":{"type":"string","maxLength":64,"nullable":true},"title":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","enum":["quiz","flashcard_deck"]},"status":{"type":"string","enum":["draft","published"]},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":20},"content":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true},"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true},"maxItems":200}},"additionalProperties":true}},"required":["title","type","content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"integer"},"updatedAt":{"type":"string"},"className":{"type":"string"},"materialId":{"type":"string","nullable":true},"materialTitle":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"assignmentCount":{"type":"integer"},"createdAt":{"type":"string"},"content":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true},"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true},"maxItems":200}},"additionalProperties":true}},"required":["id","classId","type","title","status","itemCount","updatedAt","content"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/library":{"get":{"summary":"My library across all my classes","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"integer"},"updatedAt":{"type":"string"},"className":{"type":"string"},"materialId":{"type":"string","nullable":true},"materialTitle":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"assignmentCount":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","classId","type","title","status","itemCount","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/library/{itemId}":{"get":{"summary":"One library item with its questions or cards","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"integer"},"updatedAt":{"type":"string"},"className":{"type":"string"},"materialId":{"type":"string","nullable":true},"materialTitle":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"assignmentCount":{"type":"integer"},"createdAt":{"type":"string"},"content":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true},"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true},"maxItems":200}},"additionalProperties":true}},"required":["id","classId","type","title","status","itemCount","updatedAt","content"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Edit a library item","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["draft","published"]},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":20},"content":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true},"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true},"maxItems":200}},"additionalProperties":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"integer"},"updatedAt":{"type":"string"},"className":{"type":"string"},"materialId":{"type":"string","nullable":true},"materialTitle":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"assignmentCount":{"type":"integer"},"createdAt":{"type":"string"},"content":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"front":{"type":"string","maxLength":5000},"back":{"type":"string","maxLength":5000}},"required":["front","back"],"additionalProperties":true},"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","maxLength":5000},"type":{"type":"string","maxLength":40},"options":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":10},"correctAnswer":{"type":"string","maxLength":5000},"explanation":{"type":"string","maxLength":5000},"maxScore":{"type":"number","minimum":0,"maximum":100}},"required":["question"],"additionalProperties":true},"maxItems":200}},"additionalProperties":true}},"required":["id","classId","type","title","status","itemCount","updatedAt","content"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a library item","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/insights":{"get":{"summary":"Class insights (roster engagement, top performers, needs attention)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalStudents":{"type":"integer"},"totalAssignments":{"type":"integer"},"completedSubmissions":{"type":"integer"},"openSubmissions":{"type":"integer"},"classAvgScore":{"type":"number","nullable":true},"onTimeRate":{"type":"number","nullable":true}},"required":["totalStudents","totalAssignments","completedSubmissions","openSubmissions","classAvgScore","onTimeRate"],"additionalProperties":false},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lastActive":{"type":"string","nullable":true},"minutes7d":{"type":"integer"},"minutes30d":{"type":"integer"},"streak":{"type":"integer"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"completionRate":{"type":"number","nullable":true}},"required":["id","name","lastActive","minutes7d","minutes30d","streak","totalAssigned","completed","avgScore","completionRate"],"additionalProperties":false}},"topPerformers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lastActive":{"type":"string","nullable":true},"minutes7d":{"type":"integer"},"minutes30d":{"type":"integer"},"streak":{"type":"integer"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"completionRate":{"type":"number","nullable":true}},"required":["id","name","lastActive","minutes7d","minutes30d","streak","totalAssigned","completed","avgScore","completionRate"],"additionalProperties":false}},"struggling":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lastActive":{"type":"string","nullable":true},"minutes7d":{"type":"integer"},"minutes30d":{"type":"integer"},"streak":{"type":"integer"},"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"completionRate":{"type":"number","nullable":true}},"required":["id","name","lastActive","minutes7d","minutes30d","streak","totalAssigned","completed","avgScore","completionRate"],"additionalProperties":false}},"recentActivity":{"type":"array","items":{"type":"object","properties":{"studentName":{"type":"string"},"assignmentTitle":{"type":"string"},"score":{"type":"number","nullable":true},"completedAt":{"type":"string"}},"required":["studentName","assignmentTitle","score","completedAt"],"additionalProperties":false}}},"required":["summary","students","topPerformers","struggling","recentActivity"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/insights":{"get":{"summary":"Insights across all my classes","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"classId":{"type":"string"},"className":{"type":"string"},"totalStudents":{"type":"integer"},"totalAssignments":{"type":"integer"},"completedSubmissions":{"type":"integer"},"openSubmissions":{"type":"integer"},"classAvgScore":{"type":"number","nullable":true},"onTimeRate":{"type":"number","nullable":true},"strugglingCount":{"type":"integer"}},"required":["classId","className","totalStudents","totalAssignments","completedSubmissions","openSubmissions","classAvgScore","onTimeRate","strugglingCount"],"additionalProperties":false}},"recentActivity":{"type":"array","items":{"type":"object","properties":{"studentName":{"type":"string"},"assignmentTitle":{"type":"string"},"score":{"type":"number","nullable":true},"completedAt":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"}},"required":["studentName","assignmentTitle","score","completedAt","classId","className"],"additionalProperties":false}}},"required":["classes","recentActivity"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/analytics":{"get":{"summary":"Totals across my classes (students, active this week, study minutes)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalStudents":{"type":"integer"},"activeStudents":{"type":"integer"},"totalMinutes":{"type":"integer"},"totalClasses":{"type":"integer"},"classStats":{"type":"array","items":{"type":"object","properties":{"classId":{"type":"string"},"name":{"type":"string"},"students":{"type":"integer"},"assignments":{"type":"integer"}},"required":["classId","name","students","assignments"],"additionalProperties":false}}},"required":["totalStudents","activeStudents","totalMinutes","totalClasses","classStats"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/assignments":{"get":{"summary":"All assignments across my classes","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"dueDate":{"type":"string","nullable":true},"releaseAt":{"type":"string","nullable":true},"maxPoints":{"type":"number","nullable":true},"rubric":{"type":"array","items":{"type":"object","properties":{"criterion":{"type":"string"},"points":{"type":"number"}},"required":["criterion","points"],"additionalProperties":false},"nullable":true},"aiPolicy":{"type":"string"},"source":{"type":"string"},"classroomCourseworkId":{"type":"string","nullable":true},"libraryTitle":{"type":"string","nullable":true},"itemCount":{"type":"integer"},"totalStudents":{"type":"integer"},"completedCount":{"type":"integer"},"needsReview":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer"},"assignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"canva":{"type":"object","properties":{"designId":{"type":"string"},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"format":{"type":"string"},"studentAccess":{"type":"string"}},"required":["designId","editUrl","viewUrl","format","studentAccess"],"additionalProperties":false,"nullable":true}},"required":["id","filename","mime","size","assignmentId","createdAt","canva"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","classId","className","title","description","type","dueDate","releaseAt","maxPoints","rubric","aiPolicy","source","classroomCourseworkId","libraryTitle","itemCount","totalStudents","completedCount","needsReview","avgScore","attachments","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/assignments":{"get":{"summary":"A class's assignments","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"dueDate":{"type":"string","nullable":true},"releaseAt":{"type":"string","nullable":true},"maxPoints":{"type":"number","nullable":true},"rubric":{"type":"array","items":{"type":"object","properties":{"criterion":{"type":"string"},"points":{"type":"number"}},"required":["criterion","points"],"additionalProperties":false},"nullable":true},"aiPolicy":{"type":"string"},"source":{"type":"string"},"classroomCourseworkId":{"type":"string","nullable":true},"libraryTitle":{"type":"string","nullable":true},"itemCount":{"type":"integer"},"totalStudents":{"type":"integer"},"completedCount":{"type":"integer"},"needsReview":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer"},"assignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"canva":{"type":"object","properties":{"designId":{"type":"string"},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"format":{"type":"string"},"studentAccess":{"type":"string"}},"required":["designId","editUrl","viewUrl","format","studentAccess"],"additionalProperties":false,"nullable":true}},"required":["id","filename","mime","size","assignmentId","createdAt","canva"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","classId","className","title","description","type","dueDate","releaseAt","maxPoints","rubric","aiPolicy","source","classroomCourseworkId","libraryTitle","itemCount","totalStudents","completedCount","needsReview","avgScore","attachments","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create an assignment and give it to every student in the class","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":50000,"nullable":true},"dueDate":{"type":"string","maxLength":40,"nullable":true},"releaseAt":{"type":"string","maxLength":40,"nullable":true},"maxPoints":{"type":"number","minimum":0,"maximum":10000,"nullable":true},"libraryItemIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20},"libraryItemId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"rubric":{"type":"array","items":{"type":"object","properties":{"criterion":{"type":"string","maxLength":500},"points":{"type":"number","minimum":0,"maximum":100}},"required":["criterion","points"],"additionalProperties":false},"maxItems":20,"nullable":true},"attachmentIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20},"timeLimitMinutes":{"type":"integer","minimum":1,"maximum":600,"nullable":true},"aiPolicy":{"type":"string","enum":["allowed","cited","disallowed"]}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"distributedTo":{"type":"integer"},"itemCount":{"type":"integer"}},"required":["id","distributedTo","itemCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/assignments/{assignmentId}":{"delete":{"summary":"Delete an assignment and every submission on it","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"assignmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/grades":{"get":{"summary":"Submissions to review for one assignment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"assignmentId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"status":{"type":"string"},"score":{"type":"number","nullable":true},"teacherReviewed":{"type":"boolean"},"teacherNotes":{"type":"string"},"needsReview":{"type":"boolean"},"timeExceeded":{"type":"boolean"},"completedAt":{"type":"string","nullable":true},"responses":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","nullable":true},"itemTitle":{"type":"string","nullable":true},"questionIndex":{"type":"integer"},"question":{"type":"string","nullable":true},"type":{"type":"string"},"answer":{"type":"string"},"correct":{"type":"boolean","nullable":true},"score":{"type":"number"},"maxScore":{"type":"number"},"feedback":{"type":"string","nullable":true},"aiConfidence":{"type":"number","nullable":true},"teacherOverride":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"type":"string"}},"required":["score","feedback"],"additionalProperties":false,"nullable":true}},"required":["itemId","itemTitle","questionIndex","question","type","answer","correct","score","maxScore","feedback","aiConfidence","teacherOverride"],"additionalProperties":false}}},"required":["id","studentId","studentName","status","score","teacherReviewed","teacherNotes","needsReview","timeExceeded","completedAt","responses"],"additionalProperties":false}}},"required":["submissions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Override AI scores, leave a note, mark reviewed","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overrides":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"questionIndex":{"type":"integer","minimum":0,"maximum":500},"score":{"type":"number","minimum":0,"maximum":1000},"feedback":{"type":"string","maxLength":5000,"default":""}},"required":["questionIndex","score"],"additionalProperties":false},"maxItems":200},"reviewed":{"type":"boolean"},"teacherNotes":{"type":"string","maxLength":10000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"assignmentId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"studentId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"newScore":{"type":"number","nullable":true}},"required":["success"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/analytics/{assignmentId}":{"get":{"summary":"Analytics for one assignment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"assignmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignment":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"dueDate":{"type":"string","nullable":true}},"required":["id","title","type","dueDate"],"additionalProperties":false},"summary":{"type":"object","properties":{"totalAssigned":{"type":"integer"},"completed":{"type":"integer"},"avgScore":{"type":"number","nullable":true},"onTimeCount":{"type":"integer"},"lateCount":{"type":"integer"},"medianDurationSec":{"type":"number","nullable":true}},"required":["totalAssigned","completed","avgScore","onTimeCount","lateCount","medianDurationSec"],"additionalProperties":false},"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"status":{"type":"string"},"score":{"type":"number","nullable":true},"attempts":{"type":"integer"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"teacherReviewed":{"type":"boolean"},"durationSec":{"type":"number","nullable":true},"onTime":{"type":"boolean","nullable":true}},"required":["id","studentId","studentName","status","score","attempts","startedAt","completedAt","teacherReviewed","durationSec","onTime"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"itemTitle":{"type":"string"},"questionIndex":{"type":"integer"},"question":{"type":"string"},"type":{"type":"string"},"correctCount":{"type":"integer"},"totalCount":{"type":"integer"},"avgScore":{"type":"number"}},"required":["itemId","itemTitle","questionIndex","question","type","correctCount","totalCount","avgScore"],"additionalProperties":false}}},"required":["assignment","summary","students","questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/grades":{"get":{"summary":"Student submissions across my classes","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"score":{"type":"number","nullable":true},"completedAt":{"type":"string","nullable":true},"teacherReviewed":{"type":"boolean"},"assignmentId":{"type":"string"},"assignmentTitle":{"type":"string"},"assignmentType":{"type":"string"},"classId":{"type":"string"},"className":{"type":"string"},"studentId":{"type":"string"},"studentName":{"type":"string"},"studentEmail":{"type":"string","nullable":true}},"required":["id","status","score","completedAt","teacherReviewed","assignmentId","assignmentTitle","assignmentType","classId","className","studentId","studentName","studentEmail"],"additionalProperties":false}}},"required":["submissions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/attachments":{"post":{"summary":"Upload a file to attach to an assignment (multipart \"file\")","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer"}},"required":["id","filename","mime","size"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"Class attachments (by id or by assignment)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":2000},"in":"query","name":"ids","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"assignmentId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer"},"assignmentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"canva":{"type":"object","properties":{"designId":{"type":"string"},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"format":{"type":"string"},"studentAccess":{"type":"string"}},"required":["designId","editUrl","viewUrl","format","studentAccess"],"additionalProperties":false,"nullable":true}},"required":["id","filename","mime","size","assignmentId","createdAt","canva"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/attachments/{id}":{"get":{"summary":"Download a class attachment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete a class attachment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/messages":{"get":{"summary":"A class's announcements and messages","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"sender":{"type":"string"},"recipient":{"type":"string","nullable":true},"content":{"type":"string"},"messageType":{"type":"string"},"source":{"type":"string"},"replyCount":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","classId","sender","recipient","content","messageType","source","replyCount","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Post an announcement (or a direct message) to a class","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"messageType":{"type":"string","enum":["announcement","direct"]},"recipientPersonId":{"type":"string","minLength":1,"maxLength":64,"nullable":true}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"notified":{"type":"integer"}},"required":["id","notified"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/anonymous-questions":{"get":{"summary":"Anonymous questions in a class (no student ids)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"questionText":{"type":"string"},"topic":{"type":"string","nullable":true},"teacherReply":{"type":"string","nullable":true},"repliedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"similarCount":{"type":"integer"}},"required":["id","questionText","topic","teacherReply","repliedAt","createdAt","similarCount"],"additionalProperties":false}}},"required":["questions"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Reply to or archive an anonymous question","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string","minLength":1,"maxLength":64},"reply":{"type":"string","minLength":1,"maxLength":10000},"archive":{"type":"boolean"}},"required":["questionId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/confidence":{"get":{"summary":"Class confidence by topic (last 30 days, anonymous)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"byTopic":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string","nullable":true},"avgConfidence":{"type":"number"},"n":{"type":"integer"}},"required":["topic","avgConfidence","n"],"additionalProperties":false}}},"required":["byTopic"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/tools":{"post":{"summary":"Run a teacher tool (AI)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","enum":["text-leveler","rubric-generator","report-card-comments","parent-email","lesson-plan","plagiarism-detector","essay-outliner"]},"inputs":{"type":"object","additionalProperties":{"type":"string","maxLength":60000}}},"required":["tool","inputs"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/students":{"get":{"summary":"All Students: everyone in the classes I teach (once each, first class shown)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"classId":{"type":"string"},"className":{"type":"string"},"classCount":{"type":"integer"},"lastActive":{"type":"string","nullable":true},"streak":{"type":"integer"},"recentMinutes":{"type":"integer"}},"required":["id","name","email","classId","className","classCount","lastActive","streak","recentMinutes"],"additionalProperties":false}},"classCount":{"type":"integer"}},"required":["students","classCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/student-progress/{id}":{"get":{"summary":"Student progress (last 30 days) for a student in one of my classes","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"lastActive":{"type":"string","nullable":true}},"required":["id","displayName","email","lastActive"],"additionalProperties":false},"progress":{"type":"object","properties":{"studySessions":{"type":"integer"},"totalStudyMinutes":{"type":"integer"},"quizzesTaken":{"type":"integer"},"averageQuizScore":{"type":"integer","nullable":true},"noteCount":{"type":"integer"},"deckCount":{"type":"integer"},"cardCount":{"type":"integer"},"tasksTotal":{"type":"integer"},"tasksCompleted":{"type":"integer"},"xp":{"type":"integer"},"level":{"type":"integer"},"streak":{"type":"integer"},"totalStudyMinutesAllTime":{"type":"integer"}},"required":["studySessions","totalStudyMinutes","quizzesTaken","averageQuizScore","noteCount","deckCount","cardCount","tasksTotal","tasksCompleted","xp","level","streak","totalStudyMinutesAllTime"],"additionalProperties":false},"enrolledClasses":{"type":"array","items":{"type":"string"}}},"required":["student","progress","enrolledClasses"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/assessments/{studentId}":{"get":{"summary":"The saved AI assessment for a student (weekly plan, submission insight or IEP plan)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["submission","weekly","iep"],"default":"weekly"},"in":"query","name":"mode","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"submissionId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assessment":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"studentId":{"type":"string"},"mode":{"type":"string","enum":["submission","weekly","iep"]},"submissionId":{"type":"string","nullable":true},"standing":{"type":"string"},"areasOfFocus":{"type":"array","items":{"type":"string"}},"needs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000}},"required":["title","detail"],"additionalProperties":false}},"nextSteps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000},"due_by":{"type":"string","maxLength":20,"nullable":true}},"required":["title","detail","due_by"],"additionalProperties":false}},"plan":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","maxLength":4000},"when":{"type":"string","maxLength":200},"owner":{"type":"string","maxLength":20}},"required":["step","when","owner"],"additionalProperties":false}},"teacherNotes":{"type":"string"},"recommendedAccommodations":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":40},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"reason":{"type":"string","maxLength":2000},"applied":{"type":"boolean"}},"required":["field","from","to","reason"],"additionalProperties":false}},"familyUpdate":{"type":"string"},"generatedAt":{"type":"string"},"updatedAt":{"type":"string"},"aiWritten":{"type":"boolean"}},"required":["id","classId","studentId","mode","submissionId","standing","areasOfFocus","needs","nextSteps","plan","teacherNotes","recommendedAccommodations","familyUpdate","generatedAt","updatedAt"],"additionalProperties":false,"nullable":true},"studentName":{"type":"string"},"className":{"type":"string"},"mode":{"type":"string","enum":["submission","weekly","iep"]},"submissionId":{"type":"string","nullable":true}},"required":["assessment","studentName","className","mode","submissionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Generate (or regenerate) the AI assessment from the student's signals","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["submission","weekly","iep"],"default":"weekly"},"in":"query","name":"mode","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"submissionId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assessment":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string"},"studentId":{"type":"string"},"mode":{"type":"string","enum":["submission","weekly","iep"]},"submissionId":{"type":"string","nullable":true},"standing":{"type":"string"},"areasOfFocus":{"type":"array","items":{"type":"string"}},"needs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000}},"required":["title","detail"],"additionalProperties":false}},"nextSteps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000},"due_by":{"type":"string","maxLength":20,"nullable":true}},"required":["title","detail","due_by"],"additionalProperties":false}},"plan":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","maxLength":4000},"when":{"type":"string","maxLength":200},"owner":{"type":"string","maxLength":20}},"required":["step","when","owner"],"additionalProperties":false}},"teacherNotes":{"type":"string"},"recommendedAccommodations":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":40},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"reason":{"type":"string","maxLength":2000},"applied":{"type":"boolean"}},"required":["field","from","to","reason"],"additionalProperties":false}},"familyUpdate":{"type":"string"},"generatedAt":{"type":"string"},"updatedAt":{"type":"string"},"aiWritten":{"type":"boolean"}},"required":["id","classId","studentId","mode","submissionId","standing","areasOfFocus","needs","nextSteps","plan","teacherNotes","recommendedAccommodations","familyUpdate","generatedAt","updatedAt"],"additionalProperties":false,"nullable":true},"studentName":{"type":"string"},"className":{"type":"string"},"mode":{"type":"string","enum":["submission","weekly","iep"]},"submissionId":{"type":"string","nullable":true}},"required":["assessment","studentName","className","mode","submissionId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Save edits to an assessment (creates the row if none yet)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"standing":{"type":"string","maxLength":10000},"areasOfFocus":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30},"needs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000}},"required":["title","detail"],"additionalProperties":false},"maxItems":20},"nextSteps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":4000},"due_by":{"type":"string","maxLength":20,"nullable":true}},"required":["title","detail","due_by"],"additionalProperties":false},"maxItems":20},"plan":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","maxLength":4000},"when":{"type":"string","maxLength":200},"owner":{"type":"string","maxLength":20}},"required":["step","when","owner"],"additionalProperties":false},"maxItems":20},"teacherNotes":{"type":"string","maxLength":10000},"recommendedAccommodations":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":40},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"reason":{"type":"string","maxLength":2000},"applied":{"type":"boolean"}},"required":["field","from","to","reason"],"additionalProperties":false},"maxItems":20},"familyUpdate":{"type":"string","maxLength":10000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["submission","weekly","iep"],"default":"weekly"},"in":"query","name":"mode","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"submissionId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/check-on":{"get":{"summary":"Check-on List: the classes I teach","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"studentCount":{"type":"integer"}},"required":["id","name","studentCount"],"additionalProperties":false}}},"required":["classes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/check-on":{"get":{"summary":"Students to check on in a class (top 5 by risk score)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string"},"name":{"type":"string"},"score":{"type":"integer"},"reasons":{"type":"array","items":{"type":"string"}},"suggestedOutreach":{"type":"string","nullable":true},"nudgeId":{"type":"string","nullable":true},"nudgeActedAt":{"type":"string","nullable":true},"calculatedAt":{"type":"string"}},"required":["studentId","name","score","reasons","suggestedOutreach","nudgeId","nudgeActedAt","calculatedAt"],"additionalProperties":false}},"recomputedAt":{"type":"string","nullable":true},"lastComputedAt":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"scanned":{"type":"integer"},"atRisk":{"type":"integer"},"urgent":{"type":"integer"},"openTeacherNudges":{"type":"integer"}},"required":["scanned","atRisk","urgent","openTeacherNudges"],"additionalProperties":false},"run":{"type":"object","properties":{"scanned":{"type":"integer"},"selfNudges":{"type":"integer"},"teacherNudges":{"type":"integer"}},"required":["scanned","selfNudges","teacherNudges"],"additionalProperties":false,"nullable":true}},"required":["students","recomputedAt","lastComputedAt","totals","run"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Recompute risk scores for the class (raises self / teacher nudges) and return the short list","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string"},"name":{"type":"string"},"score":{"type":"integer"},"reasons":{"type":"array","items":{"type":"string"}},"suggestedOutreach":{"type":"string","nullable":true},"nudgeId":{"type":"string","nullable":true},"nudgeActedAt":{"type":"string","nullable":true},"calculatedAt":{"type":"string"}},"required":["studentId","name","score","reasons","suggestedOutreach","nudgeId","nudgeActedAt","calculatedAt"],"additionalProperties":false}},"recomputedAt":{"type":"string","nullable":true},"lastComputedAt":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"scanned":{"type":"integer"},"atRisk":{"type":"integer"},"urgent":{"type":"integer"},"openTeacherNudges":{"type":"integer"}},"required":["scanned","atRisk","urgent","openTeacherNudges"],"additionalProperties":false},"run":{"type":"object","properties":{"scanned":{"type":"integer"},"selfNudges":{"type":"integer"},"teacherNudges":{"type":"integer"}},"required":["scanned","selfNudges","teacherNudges"],"additionalProperties":false,"nullable":true}},"required":["students","recomputedAt","lastComputedAt","totals","run"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/nudges/{id}":{"patch":{"summary":"Mark a teacher check-on nudge done, or dismiss it","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["dismissed","acted"]}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/peer-match":{"get":{"summary":"Study Buddies in a class: suggestion counts and opt-in summary (no names)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"counts":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"n":{"type":"integer"}},"required":["status","n"],"additionalProperties":false}},"optInSummary":{"type":"object","properties":{"total":{"type":"integer"},"canHelp":{"type":"integer"},"needsHelp":{"type":"integer"}},"required":["total","canHelp","needsHelp"],"additionalProperties":false}},"required":["counts","optInSummary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Pair students who asked for help with classmates who offered it (topic overlap first, load spread)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"}},"required":["created"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/sped/students/{id}":{"get":{"summary":"A student's accommodations, IEP goals and DEP IEP/504 status","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true}},"required":["id","name","gradeLevel"],"additionalProperties":false},"access":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"additionalProperties":false},"accommodations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string","nullable":true},"designation":{"type":"string"},"extendedTimePct":{"type":"integer"},"preferredFontSize":{"type":"integer"},"needsAudio":{"type":"boolean"},"reducedAnswerChoices":{"type":"integer"},"simplifiedLanguage":{"type":"boolean"},"notes":{"type":"string","nullable":true},"updatedAt":{"type":"string"}},"required":["id","classId","designation","extendedTimePct","preferredFontSize","needsAudio","reducedAnswerChoices","simplifiedLanguage","notes","updatedAt"],"additionalProperties":false}},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"classId":{"type":"string","nullable":true},"goalText":{"type":"string"},"targetMetric":{"type":"string"},"targetValue":{"type":"number"},"targetDate":{"type":"string","nullable":true},"status":{"type":"string"},"subject":{"type":"string","nullable":true},"latest":{"type":"number","nullable":true},"latestAt":{"type":"string","nullable":true}},"required":["id","classId","goalText","targetMetric","targetValue","targetDate","status","subject","latest","latestAt"],"additionalProperties":false}},"dep":{"type":"object","properties":{"iep":{"type":"object","properties":{"status":{"type":"string"},"planEnd":{"type":"string","nullable":true},"accommodations":{"type":"array","items":{"type":"string"}}},"required":["status","planEnd","accommodations"],"additionalProperties":false,"nullable":true},"plan504":{"type":"object","properties":{"status":{"type":"string"},"planEnd":{"type":"string","nullable":true}},"required":["status","planEnd"],"additionalProperties":false,"nullable":true}},"required":["iep","plan504"],"additionalProperties":false}},"required":["student","access","accommodations","goals","dep"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/special-ed":{"get":{"summary":"Special Ed: one row per student × class I teach (accommodations, goals, mistakes, risk; DEP IEP/504 beside)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"studentId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"classId":{"type":"string"},"className":{"type":"string"},"designation":{"type":"string","enum":["none","iep","504","ell"]},"designationSource":{"type":"string","enum":["module","dep_iep","dep_504"],"nullable":true},"extendedTimePct":{"type":"integer"},"needsAudio":{"type":"boolean"},"simplifiedLanguage":{"type":"boolean"},"goalCount":{"type":"integer"},"offTrackCount":{"type":"integer"},"openMistakes":{"type":"integer"},"riskScore":{"type":"integer","nullable":true},"depIep":{"type":"boolean"},"dep504":{"type":"boolean"}},"required":["studentId","name","email","classId","className","designation","designationSource","extendedTimePct","needsAudio","simplifiedLanguage","goalCount","offTrackCount","openMistakes","riskScore","depIep","dep504"],"additionalProperties":false}},"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["students","classes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/accommodations/{studentId}":{"get":{"summary":"A student's accommodations (global, this class, or merged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["global","class","merged"],"default":"merged"},"in":"query","name":"scope","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accommodations":{"type":"object","properties":{"designation":{"type":"string","enum":["none","iep","504","ell"]},"extendedTimePct":{"type":"integer"},"preferredFontSize":{"type":"integer"},"needsAudio":{"type":"boolean"},"reducedAnswerChoices":{"type":"integer"},"simplifiedLanguage":{"type":"boolean"},"notes":{"type":"string"}},"required":["designation","extendedTimePct","preferredFontSize","needsAudio","reducedAnswerChoices","simplifiedLanguage","notes"],"additionalProperties":false,"nullable":true},"designationSource":{"type":"string","nullable":true}},"required":["accommodations","designationSource"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Save a student's accommodations (global or this class only)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","class"],"default":"global"},"accommodations":{"type":"object","properties":{"designation":{"type":"string","enum":["none","iep","504","ell"],"default":"none"},"extendedTimePct":{"type":"integer","minimum":0,"maximum":200,"default":0},"preferredFontSize":{"type":"integer","minimum":10,"maximum":32,"default":14},"needsAudio":{"type":"boolean","default":false},"reducedAnswerChoices":{"type":"integer","minimum":0,"maximum":6,"default":0},"simplifiedLanguage":{"type":"boolean","default":false},"notes":{"type":"string","maxLength":1000,"nullable":true,"default":""}},"additionalProperties":false}},"required":["accommodations"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/iep-goals/{studentId}":{"get":{"summary":"A student's IEP goals with live progress (status recomputed; changes email the team)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"goalText":{"type":"string"},"targetMetric":{"type":"string","enum":["quiz_accuracy_pct","flashcard_mastery_pct","focus_minutes_weekly","assignment_completion_pct","confidence_avg","unresolved_mistakes_count"]},"targetMetricLabel":{"type":"string"},"targetValue":{"type":"number"},"targetDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["on_track","off_track","met","dropped"]},"statusChanged":{"type":"boolean"},"subject":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"observed":{"type":"number"},"sampleSize":{"type":"integer"},"history":{"type":"array","items":{"type":"object","properties":{"observed":{"type":"number"},"at":{"type":"string"}},"required":["observed","at"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["id","goalText","targetMetric","targetMetricLabel","targetValue","targetDate","status","statusChanged","subject","notes","observed","sampleSize","history","updatedAt"],"additionalProperties":false}}},"required":["goals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an IEP goal (records a first progress snapshot)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goalText":{"type":"string","minLength":1,"maxLength":1000},"targetMetric":{"type":"string","enum":["quiz_accuracy_pct","flashcard_mastery_pct","focus_minutes_weekly","assignment_completion_pct","confidence_avg","unresolved_mistakes_count"]},"targetValue":{"type":"number"},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"subject":{"type":"string","maxLength":100,"nullable":true},"notes":{"type":"string","maxLength":1000,"nullable":true},"depIepGoalId":{"type":"string","maxLength":64,"nullable":true}},"required":["goalText","targetMetric","targetValue"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/iep-goals/{goalId}":{"patch":{"summary":"Edit an IEP goal (text, measure, target, date, status)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goalText":{"type":"string","minLength":1,"maxLength":1000},"targetMetric":{"type":"string","enum":["quiz_accuracy_pct","flashcard_mastery_pct","focus_minutes_weekly","assignment_completion_pct","confidence_avg","unresolved_mistakes_count"]},"targetValue":{"type":"number"},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["on_track","off_track","met","dropped"]},"subject":{"type":"string","maxLength":100},"notes":{"type":"string","maxLength":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an IEP goal and its progress history","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Recompute: record a fresh progress snapshot for a goal","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"observed":{"type":"number"},"sampleSize":{"type":"integer"}},"required":["observed","sampleSize"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/progress-report/{studentId}":{"post":{"summary":"Draft an IEP/504 progress report with AI (the app's template when AI is off)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"studentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"report":{"type":"string"},"aiWritten":{"type":"boolean"},"goals":{"type":"array","items":{"type":"object","properties":{"goal":{"type":"string"},"metric":{"type":"string"},"target":{"type":"number"},"observed":{"type":"number"},"sampleSize":{"type":"integer"},"status":{"type":"string"},"targetDate":{"type":"string","nullable":true}},"required":["goal","metric","target","observed","sampleSize","status","targetDate"],"additionalProperties":false}},"accommodations":{"type":"object","properties":{"designation":{"type":"string","enum":["none","iep","504","ell"]},"extendedTimePct":{"type":"integer"},"preferredFontSize":{"type":"integer"},"needsAudio":{"type":"boolean"},"reducedAnswerChoices":{"type":"integer"},"simplifiedLanguage":{"type":"boolean"},"notes":{"type":"string"}},"required":["designation","extendedTimePct","preferredFontSize","needsAudio","reducedAnswerChoices","simplifiedLanguage","notes"],"additionalProperties":false}},"required":["report","aiWritten","goals","accommodations"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/tiered-assignments":{"get":{"summary":"Tier sets in a class I teach","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourcePrompt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"tierLabel":{"type":"string"}},"required":["id","title","tierLabel"],"additionalProperties":false}},"overrideCount":{"type":"integer"}},"required":["id","title","sourcePrompt","createdAt","assignments","overrideCount"],"additionalProperties":false}}},"required":["sets"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Generate a tiered quiz with AI: three parallel tiers, three assignments; students routed by accommodations","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000},"title":{"type":"string","maxLength":200},"questionCount":{"type":"integer","minimum":3,"maximum":10,"default":5},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","format":"date-time"}],"nullable":true}},"required":["prompt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"created":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["grade_level","simplified","modified"]},"assignmentId":{"type":"string"},"libraryItemId":{"type":"string"}},"required":["tier","assignmentId","libraryItemId"],"additionalProperties":false}},"distributedTo":{"type":"integer"}},"required":["id","title","created","distributedTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/tiered-assignments/{setId}/overrides":{"get":{"summary":"Per-student tier overrides for a tier set (with the class roster)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"setId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","name","email"],"additionalProperties":false}},"overrides":{"type":"array","items":{"type":"object","properties":{"studentPersonId":{"type":"string"},"tierLabel":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["studentPersonId","tierLabel","name","email"],"additionalProperties":false}}},"required":["students","overrides"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/classes/{id}/tiered-assignments/{setId}/override":{"put":{"summary":"Set a student's tier for a tier set","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","minLength":1,"maxLength":64},"tierLabel":{"type":"string","enum":["grade_level","simplified","modified"]}},"required":["studentPersonId","tierLabel"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"setId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Back to Auto (from accommodations) for a student","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"studentPersonId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"setId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/specialist/students/{id}/classes":{"get":{"summary":"A caseload student's active classes (to open their IEP plan)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["classes"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/specialist/triage":{"get":{"summary":"My weekly caseload triage","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"triage":{"type":"object","properties":{"generatedAt":{"type":"string"},"updatedAt":{"type":"string"},"topStudents":{"type":"array","items":{"type":"object","properties":{"student_id":{"type":"string"},"display_name":{"type":"string"},"rank":{"type":"integer"},"why":{"type":"string"},"suggested_action":{"type":"string"},"class_context":{"type":"string","nullable":true}},"required":["student_id","display_name","rank","why","suggested_action","class_context"],"additionalProperties":false}},"meetingNotes":{"type":"string"},"teachersToPing":{"type":"array","items":{"type":"object","properties":{"teacher_display_name":{"type":"string","maxLength":200},"class_name":{"type":"string","maxLength":255},"message_draft":{"type":"string","maxLength":4000}},"required":["teacher_display_name","class_name","message_draft"],"additionalProperties":false}},"specialistNotes":{"type":"string"},"aiWritten":{"type":"boolean"}},"required":["generatedAt","updatedAt","topStudents","meetingNotes","teachersToPing","specialistNotes"],"additionalProperties":false,"nullable":true}},"required":["triage"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Triage my week with AI: top 3 to follow up, meeting notes, teachers to ping (drafts only)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"triage":{"type":"object","properties":{"generatedAt":{"type":"string"},"updatedAt":{"type":"string"},"topStudents":{"type":"array","items":{"type":"object","properties":{"student_id":{"type":"string"},"display_name":{"type":"string"},"rank":{"type":"integer"},"why":{"type":"string"},"suggested_action":{"type":"string"},"class_context":{"type":"string","nullable":true}},"required":["student_id","display_name","rank","why","suggested_action","class_context"],"additionalProperties":false}},"meetingNotes":{"type":"string"},"teachersToPing":{"type":"array","items":{"type":"object","properties":{"teacher_display_name":{"type":"string","maxLength":200},"class_name":{"type":"string","maxLength":255},"message_draft":{"type":"string","maxLength":4000}},"required":["teacher_display_name","class_name","message_draft"],"additionalProperties":false}},"specialistNotes":{"type":"string"},"aiWritten":{"type":"boolean"}},"required":["generatedAt","updatedAt","topStudents","meetingNotes","teachersToPing","specialistNotes"],"additionalProperties":false,"nullable":true}},"required":["triage"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Save my edits to the weekly triage (meeting notes, teacher drafts, private notes)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"meetingNotes":{"type":"string","maxLength":20000},"specialistNotes":{"type":"string","maxLength":20000},"teachersToPing":{"type":"array","items":{"type":"object","properties":{"teacher_display_name":{"type":"string","maxLength":200},"class_name":{"type":"string","maxLength":255},"message_draft":{"type":"string","maxLength":4000}},"required":["teacher_display_name","class_name","message_draft"],"additionalProperties":false},"maxItems":10}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children":{"get":{"summary":"My linked children (visibility and consent requests)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"linkedVia":{"type":"string","enum":["dep_guardianship","invite_code"]},"linkedAt":{"type":"string"},"lastActive":{"type":"string","nullable":true},"band":{"type":"string","nullable":true},"privateLocked":{"type":"boolean"},"visibility":{"type":"object","properties":{"showStudySessions":{"type":"boolean"},"showQuizScores":{"type":"boolean"},"showTasks":{"type":"boolean"},"showGamification":{"type":"boolean"},"showNotes":{"type":"boolean"},"showFlashcards":{"type":"boolean"},"showAiChats":{"type":"boolean"},"showIep":{"type":"boolean"}},"required":["showStudySessions","showQuizScores","showTasks","showGamification","showNotes","showFlashcards","showAiChats","showIep"],"additionalProperties":false},"consent":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","sent","verified"]},"required":{"type":"boolean"},"canApprove":{"type":"boolean"},"verifiedAt":{"type":"string","nullable":true}},"required":["status","required","canApprove","verifiedAt"],"additionalProperties":false,"nullable":true}},"required":["id","linkId","name","gradeLevel","linkedVia","linkedAt","lastActive","band","privateLocked","visibility","consent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children/{id}/visibility":{"get":{"summary":"What I can see of a child","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"childId":{"type":"string"},"visibility":{"type":"object","properties":{"showStudySessions":{"type":"boolean"},"showQuizScores":{"type":"boolean"},"showTasks":{"type":"boolean"},"showGamification":{"type":"boolean"},"showNotes":{"type":"boolean"},"showFlashcards":{"type":"boolean"},"showAiChats":{"type":"boolean"},"showIep":{"type":"boolean"}},"required":["showStudySessions","showQuizScores","showTasks","showGamification","showNotes","showFlashcards","showAiChats","showIep"],"additionalProperties":false}},"required":["childId","visibility"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Choose what I see of a child (emits StudyParentVisibilityChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"showStudySessions":{"type":"boolean"},"showQuizScores":{"type":"boolean"},"showTasks":{"type":"boolean"},"showGamification":{"type":"boolean"},"showNotes":{"type":"boolean"},"showFlashcards":{"type":"boolean"},"showAiChats":{"type":"boolean"},"showIep":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"childId":{"type":"string"},"visibility":{"type":"object","properties":{"showStudySessions":{"type":"boolean"},"showQuizScores":{"type":"boolean"},"showTasks":{"type":"boolean"},"showGamification":{"type":"boolean"},"showNotes":{"type":"boolean"},"showFlashcards":{"type":"boolean"},"showAiChats":{"type":"boolean"},"showIep":{"type":"boolean"}},"required":["showStudySessions","showQuizScores","showTasks","showGamification","showNotes","showFlashcards","showAiChats","showIep"],"additionalProperties":false}},"required":["childId","visibility"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children/{id}/progress":{"get":{"summary":"A child's last 30 days (only what I may see)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"student":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"lastActive":{"type":"string","nullable":true}},"required":["id","name","gradeLevel","lastActive"],"additionalProperties":false},"progress":{"type":"object","properties":{"studySessions":{"type":"number","nullable":true},"totalStudyMinutes":{"type":"number","nullable":true},"quizzesTaken":{"type":"number","nullable":true},"averageQuizScore":{"type":"number","nullable":true},"tasksTotal":{"type":"number","nullable":true},"tasksCompleted":{"type":"number","nullable":true},"xp":{"type":"number","nullable":true},"level":{"type":"number","nullable":true},"streak":{"type":"number","nullable":true},"longestStreak":{"type":"number","nullable":true},"totalStudyMinutesAllTime":{"type":"number","nullable":true},"noteCount":{"type":"number","nullable":true},"deckCount":{"type":"number","nullable":true},"cardCount":{"type":"number","nullable":true}},"additionalProperties":false},"visibility":{"type":"object","properties":{"studySessions":{"type":"boolean"},"quizScores":{"type":"boolean"},"tasks":{"type":"boolean"},"gamification":{"type":"boolean"},"notes":{"type":"boolean"},"flashcards":{"type":"boolean"},"aiChats":{"type":"boolean"},"iep":{"type":"boolean"}},"required":["studySessions","quizScores","tasks","gamification","notes","flashcards","aiChats","iep"],"additionalProperties":false}},"required":["student","progress","visibility"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children/{id}/iep":{"get":{"summary":"A child's accommodations, IEP goal progress and DEP IEP/504 status","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"hidden":{"type":"boolean"},"accommodations":{"type":"object","properties":{"designation":{"type":"string","enum":["none","iep","504","ell"]},"designationSource":{"type":"string","nullable":true},"extendedTimePct":{"type":"number"},"preferredFontSize":{"type":"number"},"needsAudio":{"type":"boolean"},"reducedAnswerChoices":{"type":"number"},"simplifiedLanguage":{"type":"boolean"},"notes":{"type":"string"}},"required":["designation","designationSource","extendedTimePct","preferredFontSize","needsAudio","reducedAnswerChoices","simplifiedLanguage","notes"],"additionalProperties":false,"nullable":true},"dep":{"type":"object","properties":{"iep":{"type":"object","properties":{"status":{"type":"string"},"planEnd":{"type":"string"}},"required":["status","planEnd"],"additionalProperties":false,"nullable":true},"plan504":{"type":"object","properties":{"status":{"type":"string"},"planEnd":{"type":"string"}},"required":["status","planEnd"],"additionalProperties":false,"nullable":true}},"required":["iep","plan504"],"additionalProperties":false,"nullable":true},"goals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"goalText":{"type":"string"},"targetMetric":{"type":"string"},"targetMetricLabel":{"type":"string"},"targetValue":{"type":"number"},"targetDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["met","on_track","off_track","dropped"]},"observed":{"type":"number"},"sampleSize":{"type":"number"},"subject":{"type":"string","nullable":true}},"required":["id","goalText","targetMetric","targetMetricLabel","targetValue","targetDate","status","observed","sampleSize","subject"],"additionalProperties":false}},"summary":{"type":"object","properties":{"total":{"type":"number"},"met":{"type":"number"},"onTrack":{"type":"number"},"offTrack":{"type":"number"}},"required":["total","met","onTrack","offTrack"],"additionalProperties":false}},"required":["hidden","accommodations","dep","goals","summary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/link":{"post":{"summary":"Link a child with their invite code (emits StudyParentLinkChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":4,"maxLength":10}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"child":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["child"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children/{id}":{"delete":{"summary":"Unlink a child I linked with an invite code (emits StudyParentLinkChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"name":{"type":"string"},"gradeLevel":{"type":"string","nullable":true},"linkedVia":{"type":"string","enum":["dep_guardianship","invite_code"]},"linkedAt":{"type":"string"},"lastActive":{"type":"string","nullable":true},"band":{"type":"string","nullable":true},"privateLocked":{"type":"boolean"},"visibility":{"type":"object","properties":{"showStudySessions":{"type":"boolean"},"showQuizScores":{"type":"boolean"},"showTasks":{"type":"boolean"},"showGamification":{"type":"boolean"},"showNotes":{"type":"boolean"},"showFlashcards":{"type":"boolean"},"showAiChats":{"type":"boolean"},"showIep":{"type":"boolean"}},"required":["showStudySessions","showQuizScores","showTasks","showGamification","showNotes","showFlashcards","showAiChats","showIep"],"additionalProperties":false},"consent":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","sent","verified"]},"required":{"type":"boolean"},"canApprove":{"type":"boolean"},"verifiedAt":{"type":"string","nullable":true}},"required":["status","required","canApprove","verifiedAt"],"additionalProperties":false,"nullable":true}},"required":["id","linkId","name","gradeLevel","linkedVia","linkedAt","lastActive","band","privateLocked","visibility","consent"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/children/{id}/consent":{"post":{"summary":"Approve my child's parental-consent request (emits StudyComplianceChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve"]}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"childId":{"type":"string"},"status":{"type":"string","enum":["not_required","pending","sent","verified"]},"verifiedAt":{"type":"string","nullable":true}},"required":["childId","status","verifiedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/digests":{"get":{"summary":"Weekly digests for my children (newest first)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"childId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"childId":{"type":"string"},"child":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"generatedAt":{"type":"string"},"content":{"type":"string"},"excerpt":{"type":"string"}},"required":["id","childId","child","periodStart","periodEnd","generatedAt","content","excerpt"],"additionalProperties":false}}},"required":["enabled","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/parent/digest":{"post":{"summary":"Generate this week's AI digest for a child (emits StudyParentDigestGenerated)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"childId":{"type":"string","minLength":1,"maxLength":64}},"required":["childId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"digest":{"type":"object","properties":{"id":{"type":"string"},"childId":{"type":"string"},"child":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"generatedAt":{"type":"string"},"content":{"type":"string"},"excerpt":{"type":"string"}},"required":["id","childId","child","periodStart","periodEnd","generatedAt","content","excerpt"],"additionalProperties":false},"source":{"type":"string","enum":["ai","fallback"]}},"required":["digest","source"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/district/users":{"get":{"summary":"Everyone in the district's My Smart Study Partner (search, role, status, at risk)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"in":"query","name":"role","required":false},{"schema":{"type":"string","enum":["active","inactive"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["1","true","0","false"]},"in":"query","name":"atRisk","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"studyRole":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"title":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"lastActiveAt":{"type":"string","nullable":true},"joinedAt":{"type":"string"},"isActive":{"type":"boolean"},"hasLogin":{"type":"boolean"},"risk":{"type":"object","properties":{"completed":{"type":"integer"},"total":{"type":"integer"},"avgScore":{"type":"number","nullable":true}},"required":["completed","total","avgScore"],"additionalProperties":false,"nullable":true}},"required":["personId","name","email","studyRole","title","gradeLevel","lastActiveAt","joinedAt","isActive","hasLogin","risk"],"additionalProperties":false}},"total":{"type":"integer"},"counts":{"type":"object","properties":{"total":{"type":"integer"},"byRole":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","byRole"],"additionalProperties":false},"atRiskCount":{"type":"integer","nullable":true}},"required":["rows","total","counts","atRiskCount"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/district/users/{personId}":{"get":{"summary":"One district user: classes taught or taken, activity, moderation flags, parent links (FERPA-audited)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"personType":{"type":"string","nullable":true},"studyRole":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]},"title":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"source":{"type":"string"},"hasLogin":{"type":"boolean"},"emailVerified":{"type":"boolean","nullable":true},"joinedAt":{"type":"string"},"lastActiveAt":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["personId","name","email","personType","studyRole","title","isActive","source","hasLogin","emailVerified","joinedAt","lastActiveAt","gradeLevel"],"additionalProperties":false},"activityCount":{"type":"integer"},"moderationCount":{"type":"integer"},"moderationBySeverity":{"type":"object","additionalProperties":{"type":"integer"}},"recentActivities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","action","details","createdAt"],"additionalProperties":false}},"gamification":{"type":"object","properties":{"xp":{"type":"integer"},"level":{"type":"integer"},"currentStreak":{"type":"integer"},"longestStreak":{"type":"integer"},"totalStudyMinutes":{"type":"integer"},"totalNotesCreated":{"type":"integer"},"totalCardsReviewed":{"type":"integer"},"totalQuizzesTaken":{"type":"integer"}},"required":["xp","level","currentStreak","longestStreak","totalStudyMinutes","totalNotesCreated","totalCardsReviewed","totalQuizzesTaken"],"additionalProperties":false,"nullable":true},"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inviteCode":{"type":"string","nullable":true},"studentCount":{"type":"integer"},"assignmentCount":{"type":"integer"},"archived":{"type":"boolean"},"fromSection":{"type":"boolean"}},"required":["id","name","inviteCode","studentCount","assignmentCount","archived","fromSection"],"additionalProperties":false}},"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teacherName":{"type":"string"},"joinedAt":{"type":"string"},"status":{"type":"string"}},"required":["id","name","teacherName","joinedAt","status"],"additionalProperties":false}},"parents":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"linkedVia":{"type":"string"},"status":{"type":"string"},"linkedAt":{"type":"string","nullable":true},"isMember":{"type":"boolean"}},"required":["personId","name","email","linkedVia","status","linkedAt","isMember"],"additionalProperties":false}},"children":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"linkedVia":{"type":"string"},"status":{"type":"string"},"linkedAt":{"type":"string","nullable":true},"isMember":{"type":"boolean"}},"required":["personId","name","email","linkedVia","status","linkedAt","isMember"],"additionalProperties":false}}},"required":["user","activityCount","moderationCount","moderationBySeverity","recentActivities","gamification","classes","enrollments","parents","children"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/district/schools":{"get":{"summary":"The district's schools with My Smart Study Partner counts","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gradeRange":{"type":"string","nullable":true},"students":{"type":"integer"},"teachers":{"type":"integer"},"classes":{"type":"integer"},"activeWeek":{"type":"integer"}},"required":["id","name","gradeRange","students","teachers","classes","activeWeek"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/district/analytics":{"get":{"summary":"District analytics: schools, users, active this week, study hours, and the daily trend","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"integer","default":14},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalSchools":{"type":"integer"},"totalUsers":{"type":"integer"},"activeWeek":{"type":"integer"},"studyMinutes30d":{"type":"integer"}},"required":["totalSchools","totalUsers","activeWeek","studyMinutes30d"],"additionalProperties":false},"byRole":{"type":"object","additionalProperties":{"type":"integer"}},"days":{"type":"integer"},"activityByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"logins":{"type":"integer"},"activePeople":{"type":"integer"},"studyMinutes":{"type":"integer"},"completedAssignments":{"type":"integer"}},"required":["date","logins","activePeople","studyMinutes","completedAssignments"],"additionalProperties":false}},"totals":{"type":"object","properties":{"logins":{"type":"integer"},"studyMinutes":{"type":"integer"},"completedAssignments":{"type":"integer"},"activePeople":{"type":"integer"}},"required":["logins","studyMinutes","completedAssignments","activePeople"],"additionalProperties":false}},"required":["stats","byRole","days","activityByDay","totals"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/moderation":{"get":{"summary":"Content moderation log with severity counts","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["low","medium","high","critical"]},"in":"query","name":"severity","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"personId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string","nullable":true},"person":{"type":"string","nullable":true},"excerpt":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"severity":{"type":"string"},"actionTaken":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","personId","person","excerpt","categories","severity","actionTaken","createdAt"],"additionalProperties":false}},"total":{"type":"integer"},"stats":{"type":"object","properties":{"total":{"type":"integer"},"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"}},"required":["total","critical","high","medium","low"],"additionalProperties":false}},"required":["rows","total","stats"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/moderation/{id}":{"get":{"summary":"One moderation entry with the full flagged text (audited)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string","nullable":true},"person":{"type":"string","nullable":true},"message":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"severity":{"type":"string"},"actionTaken":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","personId","person","message","categories","severity","actionTaken","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/escalation-contacts":{"get":{"summary":"Safety escalation contacts","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"category":{"type":"string"},"isPrimary":{"type":"boolean"}},"required":["id","name","email","phone","role","department","category","isPrimary"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an escalation contact (emits StudyEscalationContactChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","maxLength":255},"phone":{"type":"string","maxLength":50,"nullable":true},"role":{"type":"string","maxLength":100,"nullable":true},"department":{"type":"string","maxLength":100,"nullable":true},"category":{"type":"string","enum":["safety","technical","academic","parental","general"]},"isPrimary":{"type":"boolean","default":false}},"required":["name","email","category"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"category":{"type":"string"},"isPrimary":{"type":"boolean"}},"required":["id","name","email","phone","role","department","category","isPrimary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/escalation-contacts/{id}":{"put":{"summary":"Edit an escalation contact (emits StudyEscalationContactChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","maxLength":255},"phone":{"type":"string","maxLength":50,"nullable":true},"role":{"type":"string","maxLength":100,"nullable":true},"department":{"type":"string","maxLength":100,"nullable":true},"category":{"type":"string","enum":["safety","technical","academic","parental","general"]},"isPrimary":{"type":"boolean","default":false}},"required":["name","email","category"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"category":{"type":"string"},"isPrimary":{"type":"boolean"}},"required":["id","name","email","phone","role","department","category","isPrimary"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an escalation contact (emits StudyEscalationContactChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/caseloads":{"get":{"summary":"Specialist caseloads","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"specialistPersonId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"specialistId":{"type":"string"},"specialist":{"type":"string"},"specialistEmail":{"type":"string","nullable":true},"specialistRole":{"type":"string"},"studentId":{"type":"string"},"student":{"type":"string"},"studentEmail":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"scope":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","specialistId","specialist","specialistEmail","specialistRole","studentId","student","studentEmail","gradeLevel","scope","createdAt"],"additionalProperties":false}},"specialists":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"role":{"type":"string"},"count":{"type":"integer"}},"required":["personId","name","email","role","count"],"additionalProperties":false}}},"required":["rows","specialists"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a student to a specialist’s caseload (emits StudyCaseloadChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"specialistPersonId":{"type":"string","maxLength":64},"studentPersonId":{"type":"string","maxLength":64},"scope":{"type":"string","enum":["full","academic","behavioral"],"default":"full"}},"required":["specialistPersonId","studentPersonId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/caseloads/options":{"get":{"summary":"Students to add to a caseload","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true}},"required":["personId","name","email","gradeLevel"],"additionalProperties":false}}},"required":["students"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/caseloads/{id}":{"delete":{"summary":"Remove a caseload row (emits StudyCaseloadChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/audit-log":{"get":{"summary":"FERPA audit log","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"action","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"subjectPersonId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{"type":"string","nullable":true},"actorEmail":{"type":"string","nullable":true},"actorRole":{"type":"string"},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":"string","nullable":true},"subjectId":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","actor","actorEmail","actorRole","action","targetType","targetId","subjectId","subject","detail","createdAt"],"additionalProperties":false}},"total":{"type":"integer"},"actions":{"type":"array","items":{"type":"string"}},"subject":{"type":"string","nullable":true}},"required":["rows","total","actions","subject"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/tickets":{"get":{"summary":"Support tickets (filters: status, type, priority)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"anyOf":[{"type":"string","enum":["open","in_progress","waiting","resolved","closed"]},{"type":"string","enum":["all"]}]},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"type":"string","enum":["bug","support","feature_request","technical","account","academic","safety","general"]},{"type":"string","enum":["all"]}]},"in":"query","name":"type","required":false},{"schema":{"anyOf":[{"type":"string","enum":["low","medium","high","critical"]},{"type":"string","enum":["all"]}]},"in":"query","name":"priority","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"person":{"type":"string"},"email":{"type":"string","nullable":true},"type":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"messageCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","personId","person","email","type","subject","status","priority","messageCount","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["rows","total","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/tickets/{id}":{"get":{"summary":"One ticket: description and messages","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"person":{"type":"string"},"email":{"type":"string","nullable":true},"type":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"description":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"senderRole":{"type":"string","enum":["user","support"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sender","senderRole","content","createdAt"],"additionalProperties":false}}},"required":["id","personId","person","email","type","subject","status","priority","createdAt","updatedAt","description","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a ticket's status or priority (emits StudyTicketChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","waiting","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","critical"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"person":{"type":"string"},"email":{"type":"string","nullable":true},"type":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"description":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"senderRole":{"type":"string","enum":["user","support"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sender","senderRole","content","createdAt"],"additionalProperties":false}}},"required":["id","personId","person","email","type","subject","status","priority","createdAt","updatedAt","description","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/tickets/{id}/messages":{"post":{"summary":"Reply to a ticket as Support (emits StudyTicketChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"person":{"type":"string"},"email":{"type":"string","nullable":true},"type":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"description":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"senderRole":{"type":"string","enum":["user","support"]},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sender","senderRole","content","createdAt"],"additionalProperties":false}}},"required":["id","personId","person","email","type","subject","status","priority","createdAt","updatedAt","description","messages"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails/stats":{"get":{"summary":"Email totals (sent, failed, suppressed) and by template","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer"},"sent":{"type":"integer"},"failed":{"type":"integer"},"suppressed":{"type":"integer"},"last30":{"type":"integer"},"byTemplate":{"type":"array","items":{"type":"object","properties":{"template":{"type":"string"},"count":{"type":"integer"}},"required":["template","count"],"additionalProperties":false}},"trial":{"type":"boolean"}},"required":["total","sent","failed","suppressed","last30","byTemplate","trial"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails":{"get":{"summary":"The email log","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["sent","failed","suppressed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"template","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"toEmail":{"type":"string"},"subject":{"type":"string","nullable":true},"template":{"type":"string","nullable":true},"status":{"type":"string"},"error":{"type":"string","nullable":true},"sentAt":{"type":"string"}},"required":["id","toEmail","subject","template","status","error","sentAt"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails/audience":{"get":{"summary":"How many members an audience reaches","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["all","students","parents","teachers","staff","admins","person"]},"in":"query","name":"audience","required":true},{"schema":{"type":"string","maxLength":64},"in":"query","name":"personId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"members":{"type":"integer"},"withEmail":{"type":"integer"},"label":{"type":"string"}},"required":["members","withEmail","label"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails/people":{"get":{"summary":"Find a member to email","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":100},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"studyRole":{"type":"string"}},"required":["personId","name","email","studyRole"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails/preview":{"post":{"summary":"Render an announcement as recipients will see it","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":200,"default":""},"body":{"type":"string","maxLength":20000,"default":""}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"html":{"type":"string"},"subject":{"type":"string"}},"required":["html","subject"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/emails/send":{"post":{"summary":"Send an announcement to a chosen audience (one email per member, through DEP’s mailer; emits StudyEmailSent per email)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audience":{"type":"string","enum":["all","students","parents","teachers","staff","admins","person"]},"personId":{"type":"string","maxLength":64},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["audience","subject","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recipients":{"type":"integer"},"sent":{"type":"integer"},"suppressed":{"type":"integer"},"failed":{"type":"integer"},"queued":{"type":"boolean"},"message":{"type":"string"}},"required":["recipients","sent","suppressed","failed","queued","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/status":{"get":{"summary":"Module switches every member sees (Maintenance Mode banner, AI on/off)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"maintenanceMode":{"type":"boolean"},"aiEnabled":{"type":"boolean"},"parentDigestEnabled":{"type":"boolean"},"supportEmail":{"type":"string","nullable":true}},"required":["maintenanceMode","aiEnabled","parentDigestEnabled","supportEmail"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/knowledge-base":{"get":{"summary":"The AI assistant's knowledge base","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"chars":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","category","tags","chars","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a knowledge-base article (emits StudyHelpContentChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","minLength":1,"maxLength":500000},"category":{"type":"string","maxLength":100,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30}},"required":["title","content"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"category":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","category","tags","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/knowledge-base/{id}":{"get":{"summary":"One knowledge-base article","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"category":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","category","tags","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Change a knowledge-base article (emits StudyHelpContentChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","minLength":1,"maxLength":500000},"category":{"type":"string","maxLength":100,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":30}},"required":["title","content"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"category":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","content","category","tags","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a knowledge-base article (emits StudyHelpContentChanged)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/knowledge-base/extract":{"post":{"summary":"Read the text of an uploaded file for a knowledge-base article (the file is not kept)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"filename":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"chars":{"type":"integer"}},"required":["filename","title","text","chars"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/users/{personId}":{"get":{"summary":"One member: profile, activity, moderation flags, classes, parent links","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"profile":{"type":"object","properties":{"personId":{"type":"string"},"memberId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"personType":{"type":"string","nullable":true},"gradeLevel":{"type":"string","nullable":true},"studyRole":{"type":"string"},"title":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"source":{"type":"string"},"hasLogin":{"type":"boolean"},"joinedAt":{"type":"string"},"lastActiveAt":{"type":"string","nullable":true},"bandLabel":{"type":"string","nullable":true}},"required":["personId","memberId","name","email","personType","gradeLevel","studyRole","title","isActive","source","hasLogin","joinedAt","lastActiveAt","bandLabel"],"additionalProperties":false},"stats":{"type":"object","properties":{"activityCount":{"type":"integer"},"moderationCount":{"type":"integer"},"daysSinceJoined":{"type":"integer"},"classCount":{"type":"integer"},"linkCount":{"type":"integer"}},"required":["activityCount","moderationCount","daysSinceJoined","classCount","linkCount"],"additionalProperties":false},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","action","details","createdAt"],"additionalProperties":false}},"moderation":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"severity":{"type":"string","nullable":true},"categories":{"type":"array","items":{"type":"string"}},"actionTaken":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","severity","categories","actionTaken","createdAt"],"additionalProperties":false}},"classes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"as":{"type":"string","enum":["student","teacher"]},"teacher":{"type":"string","nullable":true},"students":{"type":"integer","nullable":true},"status":{"type":"string"},"joinedAt":{"type":"string"}},"required":["id","name","as","teacher","students","status","joinedAt"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"as":{"type":"string","enum":["parent","child"]},"linkedVia":{"type":"string"},"status":{"type":"string"},"linkedAt":{"type":"string"}},"required":["id","personId","name","as","linkedVia","status","linkedAt"],"additionalProperties":false}},"progress":{"type":"object","properties":{"xp":{"type":"integer"},"level":{"type":"integer"},"currentStreak":{"type":"integer"},"longestStreak":{"type":"integer"},"totalStudyMinutes":{"type":"integer"},"totalQuizzesTaken":{"type":"integer"}},"required":["xp","level","currentStreak","longestStreak","totalStudyMinutes","totalQuizzesTaken"],"additionalProperties":false,"nullable":true},"can":{"type":"object","properties":{"assign":{"type":"array","items":{"type":"string"}},"deactivate":{"type":"boolean"},"email":{"type":"boolean"},"self":{"type":"boolean"}},"required":["assign","deactivate","email","self"],"additionalProperties":false}},"required":["profile","stats","activity","moderation","classes","links","progress","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/users/{personId}/email":{"post":{"summary":"Email one member (DEP mailer; suppressed on the trial box; emits StudyEmailSent)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["subject","body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recipients":{"type":"integer"},"sent":{"type":"integer"},"suppressed":{"type":"integer"},"failed":{"type":"integer"},"queued":{"type":"boolean"},"message":{"type":"string"}},"required":["recipients","sent","suppressed","failed","queued","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/schools":{"get":{"summary":"Schools with the module’s teachers, students and classes (platform staff: districts with the module)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"grades":{"type":"string","nullable":true},"principal":{"type":"string","nullable":true},"teachers":{"type":"integer"},"students":{"type":"integer"},"classes":{"type":"integer"},"depStudents":{"type":"integer"}},"required":["id","name","grades","principal","teachers","students","classes","depStudents"],"additionalProperties":false}},"districts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"schools":{"type":"integer"},"teachers":{"type":"integer"},"students":{"type":"integer"},"members":{"type":"integer"},"current":{"type":"boolean"}},"required":["id","name","status","schools","teachers","students","members","current"],"additionalProperties":false},"nullable":true},"districtName":{"type":"string"}},"required":["schools","districts","districtName"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/kpis":{"get":{"summary":"Usage & KPIs, this window against the previous one","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"integer","default":30},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"days":{"type":"integer"},"scope":{"type":"string","enum":["district","platform"]},"users":{"type":"object","properties":{"total":{"type":"integer"},"byRole":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"count":{"type":"integer"}},"required":["role","count"],"additionalProperties":false}},"activeWeek":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"activePeriod":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"signupsToday":{"type":"integer"},"signupsWeek":{"type":"integer"},"signupsPeriod":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false}},"required":["total","byRole","activeWeek","activePeriod","signupsToday","signupsWeek","signupsPeriod"],"additionalProperties":false},"platform":{"type":"object","properties":{"schools":{"type":"integer"},"classes":{"type":"integer"},"districts":{"type":"integer","nullable":true}},"required":["schools","classes","districts"],"additionalProperties":false},"usage":{"type":"object","properties":{"studySessions":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"studyMinutes":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"notesTotal":{"type":"integer"},"notes":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"decksTotal":{"type":"integer"},"decks":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"quizzes":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"aiMessages":{"type":"object","properties":{"current":{"type":"integer"},"previous":{"type":"integer"}},"required":["current","previous"],"additionalProperties":false},"toolUsage":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"count":{"type":"integer"},"previous":{"type":"integer"}},"required":["tool","count","previous"],"additionalProperties":false}}},"required":["studySessions","studyMinutes","notesTotal","notes","decksTotal","decks","quizzes","aiMessages","toolUsage"],"additionalProperties":false},"growth":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"signups":{"type":"integer"},"previous":{"type":"integer"}},"required":["date","signups","previous"],"additionalProperties":false}},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"topLabel":{"type":"string"}},"required":["days","scope","users","platform","usage","growth","top","topLabel"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/escalations":{"get":{"summary":"Counselor escalation queue (one status)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["open","in_progress","resolved","closed"],"default":"open"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"student":{"type":"string"},"classId":{"type":"string","nullable":true},"triggerType":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","resolved","closed"]},"triggerContent":{"type":"string"},"assignedTo":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string"},"resolvedAt":{"type":"string","nullable":true}},"required":["id","student","classId","triggerType","severity","status","triggerContent","assignedTo","notes","createdAt","resolvedAt"],"additionalProperties":false}},"counts":{"type":"object","properties":{"open":{"type":"integer"},"in_progress":{"type":"integer"},"resolved":{"type":"integer"},"closed":{"type":"integer"}},"required":["open","in_progress","resolved","closed"],"additionalProperties":false}},"required":["rows","counts"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/escalations/{id}":{"patch":{"summary":"Acknowledge, resolve or close an escalation; notes (emits StudyEscalationChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","resolved","closed"]},"assignedToPersonId":{"type":"string","maxLength":64,"nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"student":{"type":"string"},"classId":{"type":"string","nullable":true},"triggerType":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","resolved","closed"]},"triggerContent":{"type":"string"},"assignedTo":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string"},"resolvedAt":{"type":"string","nullable":true}},"required":["id","student","classId","triggerType","severity","status","triggerContent","assignedTo","notes","createdAt","resolvedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/integrations/status":{"get":{"summary":"My connections, the district's, policies and LinkIt status","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mine":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"connectedAt":{"type":"string"},"externalEmail":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true}},"required":["provider","connectedAt","externalEmail","displayName"],"additionalProperties":false}},"district":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"connectedAt":{"type":"string"},"displayName":{"type":"string","nullable":true}},"required":["provider","connectedAt","displayName"],"additionalProperties":false}},"policies":{"type":"array","items":{"type":"object","properties":{"integration":{"type":"string"},"mode":{"type":"string"}},"required":["integration","mode"],"additionalProperties":false}},"linkit":{"type":"object","properties":{"connected":{"type":"boolean"},"environment":{"type":"string","nullable":true},"lastSyncAt":{"type":"string","nullable":true},"pendingConflicts":{"type":"integer"},"lastRun":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true}},"required":["id","status","startedAt","finishedAt"],"additionalProperties":false,"nullable":true}},"required":["connected","environment","lastSyncAt","pendingConflicts","lastRun"],"additionalProperties":false},"can":{"type":"object","properties":{"canvaDistrict":{"type":"boolean"},"linkit":{"type":"boolean"}},"required":["canvaDistrict","linkit"],"additionalProperties":false}},"required":["mine","district","policies","linkit","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/status":{"get":{"summary":"My Google Classroom connection and linked courses","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["trial","unconfigured"],"nullable":true},"message":{"type":"string","nullable":true},"connected":{"type":"boolean"},"googleEmail":{"type":"string","nullable":true},"connectedAt":{"type":"string","nullable":true},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"classroomCourseId":{"type":"string"}},"required":["id","name","classroomCourseId"],"additionalProperties":false}}},"required":["available","reason","message","connected","googleEmail","connectedAt","courses"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/connect":{"post":{"summary":"Start connecting Google Classroom (returns the Google sign-in URL)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnPath":{"type":"string","maxLength":255,"pattern":"^\\/study(\\/[\\w\\-/?=&.%]*)?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Disconnect Google Classroom","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/callback":{"get":{"summary":"Google OAuth callback (redirects back to the study page)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":2000},"in":"query","name":"code","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"state","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"error","required":false},{"schema":{"type":"string","maxLength":500},"in":"query","name":"error_description","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/study/classroom/courses":{"get":{"summary":"My Google Classroom courses (teacher and student)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"section":{"type":"string","nullable":true},"role":{"type":"string","enum":["TEACHER","STUDENT"]}},"required":["id","name","section","role"],"additionalProperties":false}}},"required":["courses"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/import":{"post":{"summary":"Import Classroom courses as my subjects","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["courses"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"}},"required":["imported","updated"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/sync":{"post":{"summary":"Sync Classroom course work into my planner","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"errors":{"type":"integer"},"reminders":{"type":"integer"}},"required":["created","updated","errors","reminders"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/share":{"post":{"summary":"Share one of my notes or decks to a Classroom course","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemType":{"type":"string","enum":["note","deck"]},"itemId":{"type":"string","minLength":1,"maxLength":64},"courseId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"shareType":{"type":"string","enum":["material","announcement","submission"]},"assignmentId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"}},"required":["itemType","itemId","courseId","shareType"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"resultId":{"type":"string","nullable":true}},"required":["success","resultId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/materials":{"get":{"summary":"Materials of one of my Classroom courses","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"in":"query","name":"courseId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"materials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"courseId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","courseId","title","description"],"additionalProperties":false}}},"required":["materials"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Import Classroom materials as my notes","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"materialIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"minItems":1,"maxItems":200}},"required":["courseId","materialIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"imported":{"type":"integer"}},"required":["imported"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/classroom/grades":{"get":{"summary":"My Classroom grades for my linked courses","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"grades":{"type":"array","items":{"type":"object","properties":{"courseName":{"type":"string"},"courseId":{"type":"string"},"averagePercentage":{"type":"number","nullable":true},"assignments":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"grade":{"type":"number","nullable":true},"maxPoints":{"type":"number","nullable":true},"state":{"type":"string"},"late":{"type":"boolean"},"percentage":{"type":"number","nullable":true}},"required":["title","grade","maxPoints","state","late","percentage"],"additionalProperties":false}}},"required":["courseName","courseId","averagePercentage","assignments"],"additionalProperties":false}}},"required":["grades"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/teacher/roster-sync":{"post":{"summary":"Teacher sync: every Classroom course I teach → classes, rosters, course work, materials, announcements","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classesCreated":{"type":"integer"},"studentsLinked":{"type":"integer"},"assignmentsImported":{"type":"integer"},"materialsImported":{"type":"integer"},"announcementsImported":{"type":"integer"},"coursesFound":{"type":"integer"}},"required":["classesCreated","studentsLinked","assignmentsImported","materialsImported","announcementsImported","coursesFound"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canvas/status":{"get":{"summary":"My Canvas connection","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["trial","unconfigured"],"nullable":true},"message":{"type":"string","nullable":true},"connected":{"type":"boolean"},"canvasUrl":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"required":["available","reason","message","connected","canvasUrl","name"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canvas/connect":{"post":{"summary":"Connect Canvas with a personal access token","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"canvasUrl":{"type":"string","minLength":1,"maxLength":255},"accessToken":{"type":"string","minLength":1,"maxLength":500}},"required":["canvasUrl","accessToken"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"connected":{"type":"boolean","enum":[true]},"canvasUrl":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["connected","canvasUrl","name"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Disconnect Canvas (imported classes stay)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canvas/courses":{"get":{"summary":"My Canvas teacher courses","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"course_code":{"type":"string","nullable":true},"workflow_state":{"type":"string"},"already_imported":{"type":"boolean"}},"required":["id","name","course_code","workflow_state","already_imported"],"additionalProperties":false}}},"required":["courses"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canvas/import":{"post":{"summary":"Import Canvas courses as classes","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courseIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":true,"minimum":0},"maxItems":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"classesCreated":{"type":"integer"},"studentsLinked":{"type":"integer"},"assignmentsImported":{"type":"integer"},"materialsImported":{"type":"integer"},"announcementsImported":{"type":"integer"},"coursesProcessed":{"type":"integer"}},"required":["classesCreated","studentsLinked","assignmentsImported","materialsImported","announcementsImported","coursesProcessed"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/status":{"get":{"summary":"My Canva connection, the district's, and the district policy","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["trial","unconfigured"],"nullable":true},"message":{"type":"string","nullable":true},"connected":{"type":"boolean"},"personal":{"type":"object","properties":{"canvaDisplayName":{"type":"string","nullable":true},"tier":{"type":"string","nullable":true},"scopes":{"type":"array","items":{"type":"string"}}},"required":["canvaDisplayName","tier","scopes"],"additionalProperties":false,"nullable":true},"district":{"type":"object","properties":{"connected":{"type":"boolean"},"canvaDisplayName":{"type":"string","nullable":true},"tier":{"type":"string","nullable":true}},"required":["connected","canvaDisplayName","tier"],"additionalProperties":false,"nullable":true},"districtPolicy":{"type":"string","enum":["off","hybrid","required"],"nullable":true},"canManageDistrict":{"type":"boolean"}},"required":["available","reason","message","connected","personal","district","districtPolicy","canManageDistrict"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/connect":{"post":{"summary":"Start connecting Canva (mine, or the district's)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ownerType":{"type":"string","enum":["user","district"],"default":"user"},"returnPath":{"type":"string","maxLength":255,"pattern":"^\\/study(\\/[\\w\\-/?=&.%]*)?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Disconnect Canva (mine, or the district's)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","enum":["user","district"],"default":"user"},"in":"query","name":"ownerType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/callback":{"get":{"summary":"Canva OAuth callback (redirects back to the study page)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":2000},"in":"query","name":"code","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"state","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"error","required":false},{"schema":{"type":"string","maxLength":500},"in":"query","name":"error_description","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/study/canva/designs":{"get":{"summary":"Search my Canva designs","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":500},"in":"query","name":"continuation","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"designs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","thumbnailUrl","editUrl","viewUrl","updatedAt"],"additionalProperties":false}},"continuation":{"type":"string","nullable":true}},"required":["designs","continuation"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/designs/create":{"post":{"summary":"Create a Canva design (blank or from a brand template)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"templateId":{"type":"string","maxLength":100},"designType":{"type":"string","maxLength":40,"pattern":"^[\\w-]+$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"design":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","thumbnailUrl","editUrl","viewUrl","updatedAt"],"additionalProperties":false}},"required":["design"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/import-url":{"post":{"summary":"Import a Canva design from its link","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":1000},"title":{"type":"string","maxLength":255}},"required":["url"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"design":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","thumbnailUrl","editUrl","viewUrl","updatedAt"],"additionalProperties":false}},"required":["design"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/attach":{"post":{"summary":"Attach a Canva design to my class (exported as a file)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"classId":{"type":"string","minLength":1,"maxLength":64},"designId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"designTitle":{"type":"string","maxLength":255,"nullable":true},"editUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"viewUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"format":{"type":"string","enum":["pdf","png","jpg"],"default":"pdf"},"studentAccess":{"type":"string","enum":["pdf","view","edit_copy"],"default":"pdf"},"assignmentId":{"type":"string","maxLength":64}},"required":["classId","designId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string"},"size":{"type":"integer"},"canva":{"type":"object","properties":{"designId":{"type":"string"},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"format":{"type":"string"},"studentAccess":{"type":"string"}},"required":["designId","editUrl","viewUrl","format","studentAccess"],"additionalProperties":false}},"required":["id","filename","mime","size","canva"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/from-deck":{"post":{"summary":"Turn a library flashcard deck into a Canva worksheet","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"classId":{"type":"string","minLength":1,"maxLength":64},"deckId":{"type":"string","minLength":1,"maxLength":64},"attach":{"type":"boolean","default":false}},"required":["classId","deckId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"design":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","thumbnailUrl","editUrl","viewUrl","updatedAt"],"additionalProperties":false},"attachment":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string"},"size":{"type":"integer"},"canva":{"type":"object","properties":{"designId":{"type":"string"},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"format":{"type":"string"},"studentAccess":{"type":"string"}},"required":["designId","editUrl","viewUrl","format","studentAccess"],"additionalProperties":false}},"required":["id","filename","mime","size","canva"],"additionalProperties":false,"nullable":true}},"required":["design","attachment"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/attachments/{id}/refresh":{"post":{"summary":"Re-export a Canva attachment","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"size":{"type":"integer"}},"required":["success","size"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/attachments/{id}/access":{"put":{"summary":"How students open a Canva attachment (PDF, view link, own copy)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["pdf","view","edit_copy"]}},"required":["mode"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"mode":{"type":"string","enum":["pdf","view","edit_copy"]}},"required":["success","mode"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/code-quiz":{"post":{"summary":"Create a Canva Code interactive quiz design","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"classId":{"type":"string","minLength":1,"maxLength":64},"assignmentId":{"type":"string","maxLength":64},"title":{"type":"string","maxLength":255}},"required":["classId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"design":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true},"viewUrl":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","thumbnailUrl","editUrl","viewUrl","updatedAt"],"additionalProperties":false}},"required":["design"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Finish a Canva Code quiz: its published link (and responses sheet)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assignmentId":{"type":"string","minLength":1,"maxLength":64},"publishedUrl":{"type":"string","format":"uri","maxLength":500},"responsesSheetId":{"type":"string","maxLength":100,"nullable":true}},"required":["assignmentId","publishedUrl"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/code-quiz/{assignmentId}/responses":{"get":{"summary":"Responses collected by a Canva Code quiz","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"assignmentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"responses":{"type":"array","items":{}},"note":{"type":"string"}},"required":["responses"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/comments/{designId}":{"get":{"summary":"Comments on a Canva design","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"in":"path","name":"designId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"comments":{"type":"array","items":{}}},"required":["comments"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Post a comment on a Canva design","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000},"submissionId":{"type":"string","maxLength":64},"threadId":{"type":"string","maxLength":100}},"required":["message"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\w-]+$"},"in":"path","name":"designId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"commentId":{"type":"string"},"threadId":{"type":"string","nullable":true}},"required":["commentId","threadId"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/district-policy":{"get":{"summary":"The district Canva account and the Canva policy in force","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string","enum":["off","hybrid","required"]},"district":{"type":"object","properties":{"connected":{"type":"boolean"},"displayName":{"type":"string","nullable":true},"tier":{"type":"string","nullable":true},"connectedAt":{"type":"string","nullable":true}},"required":["connected","displayName","tier","connectedAt"],"additionalProperties":false},"available":{"type":"boolean"},"reason":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["mode","district","available","reason","message","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Set the district Canva policy (emits StudyIntegrationChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"integration":{"type":"string","enum":["canva"],"default":"canva"},"mode":{"type":"string","enum":["off","hybrid","required"]}},"required":["mode"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string","enum":["off","hybrid","required"]},"district":{"type":"object","properties":{"connected":{"type":"boolean"},"displayName":{"type":"string","nullable":true},"tier":{"type":"string","nullable":true},"connectedAt":{"type":"string","nullable":true}},"required":["connected","displayName","tier","connectedAt"],"additionalProperties":false},"available":{"type":"boolean"},"reason":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["mode","district","available","reason","message","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/canva/webhooks":{"post":{"summary":"Canva webhooks (comment.created, design.updated) — signed, public","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"handled":{"type":"string"},"error":{"type":"string"}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"handled":{"type":"string"},"error":{"type":"string"}},"required":["ok"],"additionalProperties":false}}}}}}},"/study/admin/linkit":{"get":{"summary":"LinkIt! connection, counts, latest run (never the key)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"credentials":{"type":"object","properties":{"status":{"type":"string"},"environment":{"type":"string"},"apiBaseUrl":{"type":"string"},"authParamName":{"type":"string"},"accessKeySet":{"type":"boolean"},"roleMap":{"type":"object","additionalProperties":{"type":"string"}},"connectedAt":{"type":"string"},"keyUpdatedAt":{"type":"string"},"lastSyncAt":{"type":"string","nullable":true}},"required":["status","environment","apiBaseUrl","authParamName","accessKeySet","roleMap","connectedAt","keyUpdatedAt","lastSyncAt"],"additionalProperties":false,"nullable":true},"counts":{"type":"object","properties":{"schools":{"type":"integer"},"staff":{"type":"integer"},"students":{"type":"integer"},"classes":{"type":"integer"},"testResults":{"type":"integer"},"testResultItems":{"type":"integer"}},"required":["schools","staff","students","classes","testResults","testResultItems"],"additionalProperties":false},"latestRun":{"type":"object","properties":{"id":{"type":"string"},"triggerType":{"type":"string"},"scope":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"errorSummary":{"type":"string","nullable":true}},"required":["id","triggerType","scope","status","startedAt","finishedAt","errorSummary"],"additionalProperties":false,"nullable":true},"pendingConflicts":{"type":"integer"},"sync":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}},"required":["available","reason","message"],"additionalProperties":false},"can":{"type":"object","properties":{"manage":{"type":"boolean"}},"required":["manage"],"additionalProperties":false}},"required":["credentials","counts","latestRun","pendingConflicts","sync","can"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/runs":{"get":{"summary":"LinkIt! sync history","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"triggerType":{"type":"string"},"scope":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"errorSummary":{"type":"string","nullable":true}},"required":["id","triggerType","scope","status","startedAt","finishedAt","errorSummary"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/runs/{id}":{"get":{"summary":"One LinkIt! sync run with its raw events (200 max)","tags":["My Smart Study Partner"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"triggerType":{"type":"string"},"scope":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"errorSummary":{"type":"string","nullable":true}},"required":["id","triggerType","scope","status","startedAt","finishedAt","errorSummary"],"additionalProperties":false},"stats":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpoint":{"type":"string"},"httpStatus":{"type":"integer"},"bytes":{"type":"integer","nullable":true},"fetchedAt":{"type":"string"},"errorMessage":{"type":"string","nullable":true},"gzipped":{"type":"boolean"},"preview":{"type":"string","nullable":true}},"required":["id","endpoint","httpStatus","bytes","fetchedAt","errorMessage","gzipped","preview"],"additionalProperties":false}},"eventTotal":{"type":"integer"}},"required":["run","stats","events","eventTotal"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/sync":{"post":{"summary":"Sync now / Roster only / Results only (refused in trial and pool districts)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["full","roster","results"],"default":"full"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/credentials":{"put":{"summary":"Connect, rotate the private key, or save the role map (key stored sealed, never returned)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"privateKey":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","minLength":10,"maxLength":5000}],"default":""},"accessKey":{"type":"string","maxLength":128,"nullable":true},"apiBaseUrl":{"type":"string","format":"uri","maxLength":255},"environment":{"type":"string","enum":["production","sandbox"],"default":"production"},"authParamName":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,31}$","default":"token"},"roleMap":{"type":"object","additionalProperties":{"type":"string","enum":["student","teacher","parent","specialist","case_manager","counselor","school_admin","district_admin","admin","super_admin"]}}},"required":["apiBaseUrl"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"healthCheck":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"ran":{"type":"boolean"}},"required":["available","reason","message","ran"],"additionalProperties":false}},"required":["ok","message","healthCheck"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Disconnect LinkIt! (removes the stored key; history stays)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/conflicts":{"get":{"summary":"Pending LinkIt! roster conflicts (500 max)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"summary":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"syncRunId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"existingPersonId":{"type":"string","nullable":true},"existingPerson":{"type":"string","nullable":true}},"required":["id","kind","summary","details","syncRunId","createdAt","existingPersonId","existingPerson"],"additionalProperties":false}},"total":{"type":"integer"}},"required":["rows","total"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/conflicts/{id}":{"post":{"summary":"Link to existing person / Resolve / Ignore a conflict (emits StudyLinkitConflictResolved)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["link","resolve","ignore"]},"targetPersonId":{"type":"string","maxLength":64}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/admin/linkit/all-districts":{"get":{"summary":"LinkIt! across districts (Omni Forge platform staff only)","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"current":{"type":"boolean"},"credentialStatus":{"type":"string"},"lastSyncAt":{"type":"string","nullable":true},"errors7d":{"type":"integer"}},"required":["districtId","name","slug","current","credentialStatus","lastSyncAt","errors7d"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/help/articles":{"get":{"summary":"In-app help articles","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"content":{"type":"string"},"displayOrder":{"type":"integer"}},"required":["id","title","category","content","displayOrder"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notifications":{"get":{"summary":"My study notifications","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"unread":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"read":{"type":"boolean"},"link":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","type","title","message","read","link","createdAt"],"additionalProperties":false}}},"required":["unread","rows"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/notifications/read":{"post":{"summary":"Mark my study notifications read (emits StudyNotificationsRead)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":500},"all":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/help/contact":{"get":{"summary":"The district's study support contact","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"supportEmail":{"type":"string","nullable":true}},"required":["supportEmail"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/study/support/tickets":{"post":{"summary":"Open a support ticket, bug report or idea (emits StudyTicketChanged)","tags":["My Smart Study Partner"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["bug","support","feature_request"]},"subject":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","minLength":1,"maxLength":10000},"priority":{"type":"string","enum":["low","medium","high","critical"],"default":"medium"}},"required":["type","subject","description"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"get":{"summary":"My support tickets","tags":["My Smart Study Partner"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","category","subject","status","priority","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/tech/me":{"get":{"summary":"Who I am in Tech Support","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/dashboard":{"get":{"summary":"Help desk dashboard","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/insights":{"get":{"summary":"Refresh planning, repeat repairs, reliability","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/tickets":{"get":{"summary":"Tickets","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","enum":["mine","assigned","queue","all"]},"in":"query","name":"scope","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"priority","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"string","enum":["breached"]},"in":"query","name":"sla","required":false},{"schema":{"type":"integer","minimum":1,"maximum":3650},"in":"query","name":"olderThanDays","required":false},{"schema":{"type":"string","enum":["today"]},"in":"query","name":"created","required":false},{"schema":{"type":"string","enum":["portal","email","phone","geni","walk_up","kiosk"]},"in":"query","name":"source","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"File a request","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"default":""},"category":{"type":"string","maxLength":30},"priority":{"type":"string","maxLength":10},"impact":{"type":"string","maxLength":20},"schoolId":{"type":"string","maxLength":64,"nullable":true},"location":{"type":"string","maxLength":120,"nullable":true},"assetTag":{"type":"string","maxLength":40,"nullable":true},"onBehalfOfPersonId":{"type":"string","maxLength":64,"nullable":true},"source":{"type":"string","enum":["portal","email","phone","geni","walk_up","kiosk"]}},"required":["subject"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/triage":{"post":{"summary":"AI triage and self-help before filing","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000,"default":""}},"required":["subject"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/tickets/{id}":{"get":{"summary":"One ticket","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Update a ticket","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","maxLength":30},"priority":{"type":"string","maxLength":10},"category":{"type":"string","maxLength":30},"assigneeUserId":{"type":"string","maxLength":64,"nullable":true},"teamId":{"type":"string","maxLength":64,"nullable":true},"assetTag":{"type":"string","maxLength":40,"nullable":true},"resolution":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/tickets/{id}/comments":{"post":{"summary":"Reply or add an internal note","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000},"internal":{"type":"boolean","default":false}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/tickets/{id}/rate":{"post":{"summary":"Rate the help received","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":500,"nullable":true}},"required":["score"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/agents":{"get":{"summary":"Technicians and their open tickets","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/devices":{"get":{"summary":"Devices","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["yes","no","loaner"]},"in":"query","name":"assigned","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/devices/{id}":{"get":{"summary":"One device: assignments, repairs, tickets","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/devices/{id}/checkout":{"post":{"summary":"Check a device out","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["one_to_one","loaner","cart"]},"dueBackAt":{"type":"string","maxLength":30,"nullable":true},"condition":{"type":"string","enum":["new","good","fair","poor","broken"]},"charger":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"nullable":true}},"required":["personId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/devices/{id}/checkin":{"post":{"summary":"Check a device in (optionally straight to repair)","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"condition":{"type":"string","enum":["new","good","fair","poor","broken"]},"charger":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"nullable":true},"damage":{"type":"object","properties":{"issue":{"type":"string","maxLength":30},"cause":{"type":"string","maxLength":20},"description":{"type":"string","maxLength":2000}},"required":["issue"],"additionalProperties":false,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/people":{"get":{"summary":"Find a student or staff member","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/repairs":{"get":{"summary":"Repairs","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Start a repair","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetTag":{"type":"string","minLength":1,"maxLength":40},"issue":{"type":"string","maxLength":30},"cause":{"type":"string","maxLength":20},"description":{"type":"string","maxLength":2000,"nullable":true},"personId":{"type":"string","maxLength":64,"nullable":true},"ticketId":{"type":"string","maxLength":64,"nullable":true},"loanerTag":{"type":"string","maxLength":40,"nullable":true}},"required":["assetTag","issue"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/repairs/{id}":{"get":{"summary":"One repair","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Update a repair","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","maxLength":30},"vendor":{"type":"string","maxLength":120,"nullable":true},"rmaNumber":{"type":"string","maxLength":60,"nullable":true},"laborMinutes":{"type":"integer","minimum":0,"maximum":10000},"notes":{"type":"string","maxLength":5000,"nullable":true},"coverage":{"type":"string","enum":["warranty","insurance","district","family"]},"chargeFamily":{"type":"boolean"},"addPart":{"type":"object","properties":{"partId":{"type":"string","maxLength":64},"quantity":{"type":"integer","minimum":1,"maximum":50}},"required":["partId"],"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/parts":{"get":{"summary":"Parts room","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a part","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"sku":{"type":"string","maxLength":80,"nullable":true},"category":{"type":"string","maxLength":30},"compatibleModels":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":30},"quantityOnHand":{"type":"integer","minimum":0},"adjustBy":{"type":"integer"},"reorderPoint":{"type":"integer","minimum":0},"unitCostCents":{"type":"integer","minimum":0},"vendor":{"type":"string","maxLength":120,"nullable":true},"location":{"type":"string","maxLength":120,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/parts/{id}":{"patch":{"summary":"Update or restock a part","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"sku":{"type":"string","maxLength":80,"nullable":true},"category":{"type":"string","maxLength":30},"compatibleModels":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":30},"quantityOnHand":{"type":"integer","minimum":0},"adjustBy":{"type":"integer"},"reorderPoint":{"type":"integer","minimum":0},"unitCostCents":{"type":"integer","minimum":0},"vendor":{"type":"string","maxLength":120,"nullable":true},"location":{"type":"string","maxLength":120,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/kb":{"get":{"summary":"Knowledge base","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Write an article","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":400,"nullable":true},"body":{"type":"string","minLength":1,"maxLength":50000},"category":{"type":"string","maxLength":30},"audience":{"type":"string","enum":["everyone","staff","students","agents"]},"keywords":{"type":"string","maxLength":500,"nullable":true},"status":{"type":"string","enum":["draft","published"]}},"required":["title","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/kb/{slug}":{"get":{"summary":"One article","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit an article","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":400,"nullable":true},"body":{"type":"string","minLength":1,"maxLength":50000},"category":{"type":"string","maxLength":30},"audience":{"type":"string","enum":["everyone","staff","students","agents"]},"keywords":{"type":"string","maxLength":500,"nullable":true},"status":{"type":"string","enum":["draft","published"]}},"required":["title","body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/kb/{slug}/helpful":{"post":{"summary":"Was this helpful?","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"helpful":{"type":"boolean"}},"required":["helpful"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/settings":{"get":{"summary":"Teams, SLA targets, technicians","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/settings/sla":{"put":{"summary":"Set SLA targets","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"string","maxLength":10},"firstResponseMinutes":{"type":"integer"},"resolveMinutes":{"type":"integer"}},"required":["priority","firstResponseMinutes","resolveMinutes"],"additionalProperties":false},"maxItems":4}},"required":["rows"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/settings/agents":{"post":{"summary":"Add or change a technician","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200},"userId":{"type":"string","maxLength":64},"role":{"type":"string","enum":["agent","lead","manager"]},"teamId":{"type":"string","maxLength":64,"nullable":true},"title":{"type":"string","maxLength":120,"nullable":true},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/reports":{"get":{"summary":"Support report: SLA, volume, technicians, satisfaction","tags":["Tech Support"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":400,"default":30},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/reports/tickets":{"get":{"summary":"Every ticket in the period (CSV export)","tags":["Tech Support"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":400,"default":30},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote/code":{"post":{"summary":"Get a one-time remote support code","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string","maxLength":64,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote/current":{"get":{"summary":"My current remote session","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote/connect":{"post":{"summary":"Technician: connect with the code the person read out","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":6,"maxLength":10}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote/{id}/room":{"post":{"summary":"Join the session room","tags":["Tech Support"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote/{id}/end":{"post":{"summary":"End the session","tags":["Tech Support"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tech/remote":{"get":{"summary":"Recent remote sessions","tags":["Tech Support"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/me":{"get":{"summary":"Support panel: who I am and whether the tab shows","tags":["Support panel"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/settings":{"put":{"summary":"District admin: show or hide the right-side Support tab","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hideTab":{"type":"boolean"}},"required":["hideTab"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/suggest":{"post":{"summary":"Self-help articles and a suggested type while they type","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":2000}},"required":["text"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/requests":{"post":{"summary":"File a support request (a Tech Support ticket)","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"default":""},"category":{"type":"string","maxLength":30},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"context":{"type":"object","properties":{"path":{"type":"string","maxLength":500},"module":{"type":"string","maxLength":40},"section":{"type":"string","maxLength":80},"browser":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":80},"device":{"type":"string","maxLength":20},"viewport":{"type":"string","maxLength":20},"screen":{"type":"string","maxLength":30},"language":{"type":"string","maxLength":20},"timezone":{"type":"string","maxLength":60},"colorScheme":{"type":"string","maxLength":10},"online":{"type":"boolean"},"build":{"type":"string","maxLength":80},"clientTime":{"type":"string","maxLength":40}},"additionalProperties":false,"nullable":true}},"required":["subject"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"My requests and bug reports","tags":["Support panel"],"parameters":[{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/bugs":{"post":{"summary":"Report a bug (a Tech Support ticket of type Bug report)","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"whatHappened":{"type":"string","minLength":1,"maxLength":2000},"expected":{"type":"string","maxLength":1500},"steps":{"type":"string","maxLength":1500},"severity":{"type":"string","enum":["blocker","major","minor","cosmetic"]},"context":{"type":"object","properties":{"path":{"type":"string","maxLength":500},"module":{"type":"string","maxLength":40},"section":{"type":"string","maxLength":80},"browser":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":80},"device":{"type":"string","maxLength":20},"viewport":{"type":"string","maxLength":20},"screen":{"type":"string","maxLength":30},"language":{"type":"string","maxLength":20},"timezone":{"type":"string","maxLength":60},"colorScheme":{"type":"string","maxLength":10},"online":{"type":"boolean"},"build":{"type":"string","maxLength":80},"clientTime":{"type":"string","maxLength":40}},"additionalProperties":false,"nullable":true}},"required":["whatHappened"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/feedback":{"post":{"summary":"Leave feedback","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5,"nullable":true},"comment":{"type":"string","maxLength":3000},"contactMe":{"type":"boolean"},"context":{"type":"object","properties":{"path":{"type":"string","maxLength":500},"module":{"type":"string","maxLength":40},"section":{"type":"string","maxLength":80},"browser":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":80},"device":{"type":"string","maxLength":20},"viewport":{"type":"string","maxLength":20},"screen":{"type":"string","maxLength":30},"language":{"type":"string","maxLength":20},"timezone":{"type":"string","maxLength":60},"colorScheme":{"type":"string","maxLength":10},"online":{"type":"boolean"},"build":{"type":"string","maxLength":80},"clientTime":{"type":"string","maxLength":40}},"additionalProperties":false,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/tickets/{id}":{"get":{"summary":"One ticket I can see, with its files","tags":["Support panel"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/tickets/{id}/comments":{"post":{"summary":"Reply on a ticket","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000},"internal":{"type":"boolean","default":false}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/tickets/{id}/rate":{"post":{"summary":"Rate the help received","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":500,"nullable":true}},"required":["score"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/tickets/{id}/attachments":{"post":{"summary":"Add a screenshot or file to a ticket (multipart, one file)","tags":["Support panel"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/attachments/{id}":{"get":{"summary":"Open a ticket file","tags":["Support panel"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/support/kb":{"get":{"summary":"Help center: articles","tags":["Support panel"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/kb/{slug}":{"get":{"summary":"Help center: one article","tags":["Support panel"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/kb/{slug}/helpful":{"post":{"summary":"Help center: was this helpful?","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"helpful":{"type":"boolean"}},"required":["helpful"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/feedback/report":{"get":{"summary":"Feedback report (technology team and district admins)","tags":["Support panel"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":400,"default":90},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/inbox":{"get":{"summary":"Every request, bug and feedback (technology team and district admins)","tags":["Support panel"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/support/inbox/{id}":{"patch":{"summary":"Staff: change status, priority or type","tags":["Support panel"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","maxLength":30},"priority":{"type":"string","maxLength":10},"category":{"type":"string","maxLength":30},"resolution":{"type":"string","maxLength":5000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/me":{"get":{"summary":"Who I am in Document Management, and my menu","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/dashboard":{"get":{"summary":"My approvals, reviews, acknowledgements and recent documents","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/notifications":{"get":{"summary":"My Document Management notices","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/notifications/read":{"post":{"summary":"Mark notices read","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":500},"all":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/libraries":{"get":{"summary":"Libraries I can open","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a library (district administrator)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"kind":{"type":"string","enum":["district","school","department"]},"schoolId":{"type":"string","maxLength":64,"nullable":true},"department":{"type":"string","maxLength":30,"nullable":true},"confidential":{"type":"boolean"},"isActive":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/libraries/{id}":{"patch":{"summary":"Edit or archive a library","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"kind":{"type":"string","enum":["district","school","department"]},"schoolId":{"type":"string","maxLength":64,"nullable":true},"department":{"type":"string","maxLength":30,"nullable":true},"confidential":{"type":"boolean"},"isActive":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/browse":{"get":{"summary":"A library or folder: sub-folders and documents","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"libraryId","required":true},{"schema":{"type":"string","maxLength":64},"in":"query","name":"folderId","required":false},{"schema":{"type":"string","enum":["name","updated"]},"in":"query","name":"sort","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/tree":{"get":{"summary":"The folder tree of a library","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"libraryId","required":true},{"schema":{"type":"string","enum":["read","contribute"]},"in":"query","name":"min","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/folders":{"post":{"summary":"New folder","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"libraryId":{"type":"string","minLength":1,"maxLength":64},"parentId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","minLength":1,"maxLength":160},"confidential":{"type":"boolean"}},"required":["libraryId","name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/folders/{id}":{"patch":{"summary":"Rename, move or change a folder","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"parentId":{"type":"string","maxLength":64,"nullable":true},"libraryId":{"type":"string","maxLength":64},"confidential":{"type":"boolean"},"inheritPermissions":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Move a folder (and everything in it) to the recycle bin","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/folders/{id}/restore":{"post":{"summary":"Restore a folder from the recycle bin","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/favorites":{"get":{"summary":"My favourites","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Star or unstar","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"type":"string","enum":["document","folder","library"]},"targetId":{"type":"string","minLength":1,"maxLength":64},"on":{"type":"boolean"}},"required":["targetType","targetId","on"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/recent":{"get":{"summary":"Documents I opened or changed lately","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents":{"get":{"summary":"Search documents (metadata: title, tags, type, owner, school, department, dates)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"libraryId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"folderId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"docType","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"ownerUserId","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mine","required":false},{"schema":{"type":"boolean"},"in":"query","name":"reviewDue","required":false},{"schema":{"type":"string","enum":["updated","title","review"]},"in":"query","name":"sort","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Upload a document (multipart: libraryId, folderId?, title?, docType?, … then the file)","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}":{"get":{"summary":"One document: versions, workflows, signatures, acknowledgements, activity","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit details and tags","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"description":{"type":"string","maxLength":10000,"nullable":true},"docType":{"type":"string","enum":["policy","regulation","procedure","contract","agreement","form","curriculum","iep","plan","minutes","report","handbook","memo","purchase","other"]},"schoolId":{"type":"string","maxLength":64,"nullable":true},"department":{"type":"string","maxLength":30,"nullable":true},"ownerUserId":{"type":"string","maxLength":64},"effectiveDate":{"type":"string","maxLength":10,"nullable":true},"reviewDate":{"type":"string","maxLength":10,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20},"confidential":{"type":"boolean"},"inheritPermissions":{"type":"boolean"},"retentionScheduleId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","enum":["draft","in_review","changes_requested","approved","rejected","signed","published","archived"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/versions":{"post":{"summary":"Upload a new version (multipart: note?, then the file)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/versions/{versionId}/restore":{"post":{"summary":"Make an old version current again (as a new version)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/checkout":{"post":{"summary":"Check out (lock for editing)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/checkin":{"post":{"summary":"Check in without a new file (or release)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/checkin-file":{"post":{"summary":"Check in with the edited file (multipart: note?, file)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/bulk/move":{"post":{"summary":"Move documents","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":200},"libraryId":{"type":"string","minLength":1,"maxLength":64},"folderId":{"type":"string","maxLength":64,"nullable":true}},"required":["ids","libraryId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/bulk/copy":{"post":{"summary":"Copy documents","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":200},"libraryId":{"type":"string","minLength":1,"maxLength":64},"folderId":{"type":"string","maxLength":64,"nullable":true}},"required":["ids","libraryId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/bulk/delete":{"post":{"summary":"Move documents to the recycle bin","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":200}},"required":["ids"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/bulk/restore":{"post":{"summary":"Restore documents from the recycle bin","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":200}},"required":["ids"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/bulk/tag":{"post":{"summary":"Add or remove tags","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":200},"add":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":10,"default":[]},"remove":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":10,"default":[]}},"required":["ids"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/recycle-bin":{"get":{"summary":"Deleted documents and folders I can restore","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/view":{"get":{"summary":"Open the file in the browser (PDF and images)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"versionId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/dms/documents/{id}/download":{"get":{"summary":"Download the file","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"versionId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/dms/lookups":{"get":{"summary":"Types, departments, roles, schools, groups, templates and schedules for forms","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/people":{"get":{"summary":"Find staff (for approvers, signers, grants)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":80},"in":"query","name":"q","required":true},{"schema":{"type":"boolean"},"in":"query","name":"family","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/approvals":{"get":{"summary":"Steps waiting for me (or decided by me)","tags":["Document Management"],"parameters":[{"schema":{"type":"string","enum":["waiting","done"]},"in":"query","name":"scope","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/in-review":{"get":{"summary":"My documents in a workflow now","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/workflows":{"get":{"summary":"Workflows across the documents I can read","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"templateId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/workflows":{"post":{"summary":"Start a sign-off workflow on the current version","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","maxLength":1000,"nullable":true}},"required":["templateId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/steps/{id}/decide":{"post":{"summary":"Approve, reject or request changes (comment required to reject or request changes)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject","request_changes"]},"comment":{"type":"string","maxLength":5000,"nullable":true}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/steps/{id}/delegate":{"post":{"summary":"Pass my approval to someone else","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toUserId":{"type":"string","minLength":1,"maxLength":64},"comment":{"type":"string","maxLength":1000,"nullable":true}},"required":["toUserId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/workflows/{id}/comment":{"post":{"summary":"Comment on a workflow","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["text"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/workflows/{id}/cancel":{"post":{"summary":"Cancel a workflow","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/templates":{"get":{"summary":"Workflow templates","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"docType","required":false},{"schema":{"type":"boolean"},"in":"query","name":"all","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"New workflow template","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"docTypes":{"type":"array","items":{"type":"string","maxLength":30},"maxItems":20},"onNewVersion":{"type":"string","enum":["restart","resume"]},"finalStatus":{"type":"string","enum":["approved","published","signed"]},"isActive":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"integer","minimum":1,"maximum":20},"name":{"type":"string","minLength":1,"maxLength":160},"stepType":{"type":"string","enum":["approval","review","esign"]},"approverType":{"type":"string","enum":["user","role","role_at_school","group","department_head","owner"]},"approverUserId":{"type":"string","maxLength":64,"nullable":true},"approverRole":{"type":"string","maxLength":50,"nullable":true},"approverGroupId":{"type":"string","maxLength":64,"nullable":true},"decision":{"type":"string","enum":["any","all"]},"dueDays":{"type":"integer","minimum":1,"maximum":90},"reminderEveryDays":{"type":"integer","minimum":1,"maximum":30},"escalateAfterDays":{"type":"integer","minimum":0,"maximum":60,"nullable":true},"escalateToRole":{"type":"string","maxLength":50,"nullable":true},"escalateToUserId":{"type":"string","maxLength":64,"nullable":true},"esignConfig":{"type":"object","properties":{"signers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["role","user","owner","group"]},"role":{"type":"string","maxLength":50},"userId":{"type":"string","maxLength":64},"groupId":{"type":"string","maxLength":64}},"required":["type"],"additionalProperties":false},"maxItems":10},"message":{"type":"string","maxLength":1000}},"additionalProperties":false,"nullable":true}},"required":["stage","name"],"additionalProperties":false},"maxItems":20}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/templates/{id}":{"patch":{"summary":"Edit a workflow template (running workflows keep their copy)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"docTypes":{"type":"array","items":{"type":"string","maxLength":30},"maxItems":20},"onNewVersion":{"type":"string","enum":["restart","resume"]},"finalStatus":{"type":"string","enum":["approved","published","signed"]},"isActive":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"integer","minimum":1,"maximum":20},"name":{"type":"string","minLength":1,"maxLength":160},"stepType":{"type":"string","enum":["approval","review","esign"]},"approverType":{"type":"string","enum":["user","role","role_at_school","group","department_head","owner"]},"approverUserId":{"type":"string","maxLength":64,"nullable":true},"approverRole":{"type":"string","maxLength":50,"nullable":true},"approverGroupId":{"type":"string","maxLength":64,"nullable":true},"decision":{"type":"string","enum":["any","all"]},"dueDays":{"type":"integer","minimum":1,"maximum":90},"reminderEveryDays":{"type":"integer","minimum":1,"maximum":30},"escalateAfterDays":{"type":"integer","minimum":0,"maximum":60,"nullable":true},"escalateToRole":{"type":"string","maxLength":50,"nullable":true},"escalateToUserId":{"type":"string","maxLength":64,"nullable":true},"esignConfig":{"type":"object","properties":{"signers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["role","user","owner","group"]},"role":{"type":"string","maxLength":50},"userId":{"type":"string","maxLength":64},"groupId":{"type":"string","maxLength":64}},"required":["type"],"additionalProperties":false},"maxItems":10},"message":{"type":"string","maxLength":1000}},"additionalProperties":false,"nullable":true}},"required":["stage","name"],"additionalProperties":false},"maxItems":20}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Archive a workflow template","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/esign":{"post":{"summary":"Send the current version for e-signature through Document Signing","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signerUserIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":20},"message":{"type":"string","maxLength":1000,"nullable":true},"dueDays":{"type":"integer","minimum":1,"maximum":60}},"required":["signerUserIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/mine":{"get":{"summary":"What I have been asked to read and acknowledge","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements":{"get":{"summary":"Acknowledgement campaigns I manage","tags":["Document Management"],"parameters":[{"schema":{"type":"string","enum":["active","closed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/{id}":{"get":{"summary":"Who has and hasn’t acknowledged","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/acknowledgements":{"post":{"summary":"Publish for read-and-acknowledge","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audience":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all_staff"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["school_staff"]},"schoolId":{"type":"string","maxLength":64}},"required":["type","schoolId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["department"]},"department":{"type":"string","enum":["hr","finance","facilities","special_services","curriculum","board","technology","transportation","food_service"]}},"required":["type","department"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["role"]},"role":{"type":"string","maxLength":50}},"required":["type","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"groupId":{"type":"string","maxLength":64}},"required":["type","groupId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["users"]},"userIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":2000}},"required":["type","userIds"],"additionalProperties":false}]},"title":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":2000,"nullable":true},"dueDays":{"type":"integer","minimum":1,"maximum":120},"reminderEveryDays":{"type":"integer","minimum":1,"maximum":30}},"required":["audience"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/{id}/acknowledge":{"post":{"summary":"I have read and acknowledge this","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/{id}/remind":{"post":{"summary":"Remind everyone who has not acknowledged","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/{id}/people":{"post":{"summary":"Add people to a campaign","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":500}},"required":["userIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/acknowledgements/{id}/close":{"post":{"summary":"Close a campaign","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/schedules":{"get":{"summary":"Retention schedules","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"New retention schedule","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":30},"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"docTypes":{"type":"array","items":{"type":"string","maxLength":30},"maxItems":20},"retainYears":{"type":"integer","minimum":0,"maximum":100},"trigger":{"type":"string","enum":["created","effective","superseded"]},"action":{"type":"string","enum":["destroy","review","archive"]},"isActive":{"type":"boolean"},"archive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/schedules/{id}":{"patch":{"summary":"Edit a retention schedule","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":30},"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000,"nullable":true},"docTypes":{"type":"array","items":{"type":"string","maxLength":30},"maxItems":20},"retainYears":{"type":"integer","minimum":0,"maximum":100},"trigger":{"type":"string","enum":["created","effective","superseded"]},"action":{"type":"string","enum":["destroy","review","archive"]},"isActive":{"type":"boolean"},"archive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/holds":{"get":{"summary":"Legal holds","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Place a legal hold","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"reason":{"type":"string","maxLength":1000,"nullable":true},"documentIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":1000}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/holds/{id}":{"get":{"summary":"Documents under a hold","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/holds/{id}/documents":{"post":{"summary":"Add documents to a hold","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":1000}},"required":["documentIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/holds/{id}/release":{"post":{"summary":"Release a hold (or some of its documents)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/retention/disposition":{"get":{"summary":"Disposition queue","tags":["Document Management"],"parameters":[{"schema":{"type":"string","enum":["queued","approved","deferred","kept"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Approve destruction (soft delete with audit), defer or keep","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":500},"decision":{"type":"string","enum":["approve","defer","keep"]},"note":{"type":"string","maxLength":1000,"nullable":true},"deferMonths":{"type":"integer","minimum":1,"maximum":120}},"required":["ids","decision"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/retention":{"patch":{"summary":"Set a document’s retention schedule or legal hold","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"retentionScheduleId":{"type":"string","maxLength":64,"nullable":true},"legalHoldId":{"type":"string","maxLength":64,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/permissions":{"get":{"summary":"Grants on a library, folder or document","tags":["Document Management"],"parameters":[{"schema":{"type":"string","enum":["library","folder","document"]},"in":"query","name":"targetType","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"targetId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Give access","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"type":"string","enum":["library","folder","document"]},"targetId":{"type":"string","minLength":1,"maxLength":64},"grant":{"type":"object","properties":{"principalType":{"type":"string","enum":["all_staff","role","role_at_school","user","group"]},"role":{"type":"string","maxLength":50,"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"userId":{"type":"string","maxLength":64,"nullable":true},"groupId":{"type":"string","maxLength":64,"nullable":true},"level":{"type":"string","enum":["read","contribute","manage"]}},"required":["principalType","level"],"additionalProperties":false}},"required":["targetType","targetId","grant"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/permissions/{id}":{"delete":{"summary":"Remove access","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/documents/{id}/access":{"get":{"summary":"Who can see this document and why","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/groups":{"get":{"summary":"DMS groups","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"New group","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":500,"nullable":true},"addUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"removeUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"archive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/groups/{id}":{"patch":{"summary":"Edit a group or its members","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":500,"nullable":true},"addUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"removeUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"archive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/settings":{"get":{"summary":"Document Management settings","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save settings","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxUploadMb":{"type":"integer","minimum":1,"maximum":40},"defaultReminderDays":{"type":"integer","minimum":1,"maximum":30},"ackReminderDays":{"type":"integer","minimum":1,"maximum":30},"reviewNoticeDays":{"type":"integer","minimum":1,"maximum":180},"emailEnabled":{"type":"boolean"},"allowFamilyShares":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/reports":{"get":{"summary":"Turnaround, bottlenecks, acknowledgement completion, storage","tags":["Document Management"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":730,"default":90},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/activity":{"get":{"summary":"Activity log (who viewed, downloaded, edited, approved) — exportable","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"documentId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"actorUserId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"action","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":5000},"in":"query","name":"take","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/elsewhere":{"get":{"summary":"Documents kept elsewhere in DEP","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/elsewhere/building-documents/{id}/file":{"post":{"summary":"File a building document into Document Management","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"libraryId":{"type":"string","minLength":1,"maxLength":64},"folderId":{"type":"string","maxLength":64,"nullable":true}},"required":["libraryId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/elsewhere/hr-documents/{id}/file":{"post":{"summary":"File a personnel file into a confidential library","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"libraryId":{"type":"string","minLength":1,"maxLength":64},"folderId":{"type":"string","maxLength":64,"nullable":true}},"required":["libraryId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/admin/check":{"get":{"summary":"District administrator check (for admin-only screens)","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts":{"get":{"summary":"Contracts I can see, with KPI tiles and filter options","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"ownerUserId","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"vendor","required":false},{"schema":{"type":"string","enum":["yes","no"]},"in":"query","name":"autoRenew","required":false},{"schema":{"type":"number","minimum":0},"in":"query","name":"minValue","required":false},{"schema":{"type":"number","minimum":0},"in":"query","name":"maxValue","required":false},{"schema":{"type":"integer","minimum":0,"maximum":3650},"in":"query","name":"within","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mine","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Track a document as a contract","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractNumber":{"type":"string","maxLength":60,"nullable":true},"vendorId":{"type":"string","maxLength":64,"nullable":true},"vendorName":{"type":"string","maxLength":200,"nullable":true},"vendorContact":{"type":"string","maxLength":200,"nullable":true},"vendorEmail":{"type":"string","maxLength":320,"nullable":true},"vendorAddress":{"type":"string","maxLength":400,"nullable":true},"category":{"type":"string","maxLength":30},"department":{"type":"string","enum":["hr","finance","facilities","special_services","curriculum","board","technology","transportation","food_service"],"nullable":true},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"ownerUserId":{"type":"string","maxLength":64},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"termMonths":{"type":"integer","minimum":1,"maximum":240,"nullable":true},"autoRenew":{"type":"boolean"},"renewalTermMonths":{"type":"integer","minimum":1,"maximum":120,"nullable":true},"noticeDays":{"type":"integer","minimum":0,"maximum":730},"annualValue":{"type":"number","minimum":0,"maximum":1000000000000,"nullable":true},"totalValue":{"type":"number","minimum":0,"maximum":1000000000000,"nullable":true},"fundingSource":{"type":"string","maxLength":200,"nullable":true},"budgetAccountId":{"type":"string","maxLength":64,"nullable":true},"purchaseOrderId":{"type":"string","maxLength":64,"nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true},"status":{"type":"string","enum":["active","under_review","renewing","renegotiating","cancelling","expired","terminated"]},"reason":{"type":"string","maxLength":1000,"nullable":true},"documentId":{"type":"string","minLength":1,"maxLength":64}},"required":["documentId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/needs-review":{"get":{"summary":"Contracts needing a decision before their notice deadline","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/reports":{"get":{"summary":"Renewal pipeline, spend by vendor and department, expiring by fiscal year, missed deadlines","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/lookups":{"get":{"summary":"Finance vendors, budget lines and purchase orders for the contract form","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/settings":{"get":{"summary":"Contract alert lead times and recipients","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save contract alert settings (district administrators and the business office)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"leadDays":{"type":"array","items":{"type":"integer","minimum":1,"maximum":365},"minItems":1,"maxItems":10},"escalateDays":{"type":"integer","minimum":1,"maximum":30},"notifyDepartmentHead":{"type":"boolean"},"notifyBusinessOffice":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/run-alerts":{"post":{"summary":"Run today’s contract alerts now (district administrators; each alert is still sent once)","tags":["Document Management"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/for-document/{id}":{"get":{"summary":"The contract record on a document, if any","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}":{"get":{"summary":"One contract: details, review, decision, related documents, alerts and audit trail","tags":["Document Management"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit a contract (a status change needs a reason)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contractNumber":{"type":"string","maxLength":60,"nullable":true},"vendorId":{"type":"string","maxLength":64,"nullable":true},"vendorName":{"type":"string","maxLength":200,"nullable":true},"vendorContact":{"type":"string","maxLength":200,"nullable":true},"vendorEmail":{"type":"string","maxLength":320,"nullable":true},"vendorAddress":{"type":"string","maxLength":400,"nullable":true},"category":{"type":"string","maxLength":30},"department":{"type":"string","enum":["hr","finance","facilities","special_services","curriculum","board","technology","transportation","food_service"],"nullable":true},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"ownerUserId":{"type":"string","maxLength":64},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"termMonths":{"type":"integer","minimum":1,"maximum":240,"nullable":true},"autoRenew":{"type":"boolean"},"renewalTermMonths":{"type":"integer","minimum":1,"maximum":120,"nullable":true},"noticeDays":{"type":"integer","minimum":0,"maximum":730},"annualValue":{"type":"number","minimum":0,"maximum":1000000000000,"nullable":true},"totalValue":{"type":"number","minimum":0,"maximum":1000000000000,"nullable":true},"fundingSource":{"type":"string","maxLength":200,"nullable":true},"budgetAccountId":{"type":"string","maxLength":64,"nullable":true},"purchaseOrderId":{"type":"string","maxLength":64,"nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true},"status":{"type":"string","enum":["active","under_review","renewing","renegotiating","cancelling","expired","terminated"]},"reason":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/remove":{"post":{"summary":"Stop tracking (the document stays)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/links":{"post":{"summary":"Link a related document (amendment, insurance certificate, signed copy…)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["amendment","insurance","signed_copy","notice","renewal","other"]},"note":{"type":"string","maxLength":500,"nullable":true}},"required":["documentId","kind"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/links/{linkId}":{"delete":{"summary":"Unlink a related document","tags":["Document Management"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"linkId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/review":{"post":{"summary":"Start the “Contract renewal review” sign-off","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/decision":{"post":{"summary":"Record the decision: renew as is, renegotiate, cancel or let expire (rationale required)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["renew","renegotiate","cancel","let_expire"]},"rationale":{"type":"string","minLength":1,"maxLength":5000}},"required":["decision","rationale"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/reopen":{"post":{"summary":"Reopen a decision (before a renewal or notice has gone out)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/renewal":{"post":{"summary":"Prepare the renewal and send it for e-signature through Document Signing","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["generate","current"]},"newEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"annualValue":{"type":"number","minimum":0,"maximum":1000000000000,"nullable":true},"terms":{"type":"string","maxLength":3000,"nullable":true},"signerUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":10},"message":{"type":"string","maxLength":1000,"nullable":true}},"required":["mode"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/dms/contracts/{id}/notice":{"post":{"summary":"Generate the cancellation / non-renewal notice letter (optionally send it for signature)","tags":["Document Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"noticeDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"send":{"type":"boolean"},"signerUserIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":10},"message":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/me":{"get":{"summary":"Who I am in IT Ops (and the sidebar menu)","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/overview":{"get":{"summary":"The whole wall: status, panels, alerts, service desk, footer","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/items":{"get":{"summary":"Monitored items (catalogue)","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"kind","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeRetired","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add an item","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["infra","app","building","sensor","security","fleet","power"]},"key":{"type":"string","maxLength":120},"name":{"type":"string","minLength":1,"maxLength":120},"product":{"type":"string","maxLength":120,"nullable":true},"service":{"type":"string","enum":["wan","wifi","switches","ups","voip","cameras"],"nullable":true},"buildingId":{"type":"string","maxLength":64,"nullable":true},"icon":{"type":"string","maxLength":40,"nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"sortOrder":{"type":"integer","minimum":0,"maximum":10000},"staleAfterMinutes":{"type":"integer","minimum":2,"maximum":10080,"nullable":true},"thresholds":{"type":"object","properties":{"warnAbove":{"type":"number","nullable":true},"critAbove":{"type":"number","nullable":true},"warnBelow":{"type":"number","nullable":true},"critBelow":{"type":"number","nullable":true},"latencyWarnMs":{"type":"number","nullable":true},"latencyCritMs":{"type":"number","nullable":true}},"additionalProperties":false,"nullable":true},"meta":{"type":"object","additionalProperties":{},"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/items/{id}":{"get":{"summary":"One item with its history","tags":["IT Ops"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":336,"default":72},"in":"query","name":"hours","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit an item (name, thresholds, ...)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["infra","app","building","sensor","security","fleet","power"]},"key":{"type":"string","maxLength":120},"name":{"type":"string","minLength":1,"maxLength":120},"product":{"type":"string","maxLength":120,"nullable":true},"service":{"type":"string","enum":["wan","wifi","switches","ups","voip","cameras"],"nullable":true},"buildingId":{"type":"string","maxLength":64,"nullable":true},"icon":{"type":"string","maxLength":40,"nullable":true},"unit":{"type":"string","maxLength":20,"nullable":true},"sortOrder":{"type":"integer","minimum":0,"maximum":10000},"staleAfterMinutes":{"type":"integer","minimum":2,"maximum":10080,"nullable":true},"thresholds":{"type":"object","properties":{"warnAbove":{"type":"number","nullable":true},"critAbove":{"type":"number","nullable":true},"warnBelow":{"type":"number","nullable":true},"critBelow":{"type":"number","nullable":true},"latencyWarnMs":{"type":"number","nullable":true},"latencyCritMs":{"type":"number","nullable":true}},"additionalProperties":false,"nullable":true},"meta":{"type":"object","additionalProperties":{},"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/items/{id}/retire":{"post":{"summary":"Retire or restore an item","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"retire":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/buildings/{id}":{"get":{"summary":"One building: services, history, alerts","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/buildings":{"get":{"summary":"Building Health columns (mapping)","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save the Building Health columns","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"buildingId":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":40},"sortOrder":{"type":"integer","minimum":0,"maximum":1000},"shown":{"type":"boolean"}},"required":["buildingId","label","sortOrder","shown"],"additionalProperties":false},"maxItems":200}},"required":["rows"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/security":{"get":{"summary":"Security posture with trends","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/devices":{"get":{"summary":"Device fleet: flagged devices","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"flag","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/alerts":{"get":{"summary":"Alerts","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"severity","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1,"maximum":90},"in":"query","name":"days","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Raise an alert by hand","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"severity":{"type":"string","enum":["critical","warning","info"]},"message":{"type":"string","minLength":1,"maxLength":300},"location":{"type":"string","maxLength":120,"nullable":true},"buildingId":{"type":"string","maxLength":64,"nullable":true},"itemId":{"type":"string","maxLength":64,"nullable":true}},"required":["severity","message"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/alerts/{id}/ack":{"post":{"summary":"Acknowledge an alert","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/alerts/{id}/resolve":{"post":{"summary":"Resolve an alert","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/incidents":{"get":{"summary":"Incidents, a page at a time (filters: status, severity, impact, q)","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","enum":["open","all","investigating","identified","monitoring","resolved"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["major","minor"]},"in":"query","name":"severity","required":false},{"schema":{"type":"string","enum":["outage","degraded"]},"in":"query","name":"impact","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Open an incident","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"severity":{"type":"string","enum":["major","minor"]},"impact":{"type":"string","enum":["outage","degraded"]},"summary":{"type":"string","maxLength":5000,"nullable":true},"itemIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"buildingIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/incidents/{id}":{"get":{"summary":"One incident with its timeline","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Post an update or change an incident (incl. affected systems and buildings)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["investigating","identified","monitoring","resolved"]},"body":{"type":"string","maxLength":5000},"title":{"type":"string","maxLength":200},"impact":{"type":"string","enum":["outage","degraded"]},"severity":{"type":"string","enum":["major","minor"]},"summary":{"type":"string","maxLength":5000,"nullable":true},"itemIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"buildingIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/maintenance":{"get":{"summary":"Maintenance windows","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"to","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Schedule maintenance","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"impact":{"type":"string","maxLength":300,"nullable":true},"startsAt":{"type":"string","maxLength":40},"endsAt":{"type":"string","maxLength":40},"itemIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"buildingIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"status":{"type":"string","enum":["scheduled","cancelled","completed"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/maintenance/{id}":{"patch":{"summary":"Edit or cancel maintenance","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"impact":{"type":"string","maxLength":300,"nullable":true},"startsAt":{"type":"string","maxLength":40},"endsAt":{"type":"string","maxLength":40},"itemIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"buildingIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"status":{"type":"string","enum":["scheduled","cancelled","completed"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/announcements":{"get":{"summary":"Announcements on the wall","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add an announcement","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["info","warning","emergency"]},"title":{"type":"string","minLength":1,"maxLength":160},"body":{"type":"string","maxLength":500,"nullable":true},"startsAt":{"type":"string","maxLength":40,"nullable":true},"endsAt":{"type":"string","maxLength":40,"nullable":true},"active":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/announcements/{id}":{"patch":{"summary":"Edit an announcement","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["info","warning","emergency"]},"title":{"type":"string","minLength":1,"maxLength":160},"body":{"type":"string","maxLength":500,"nullable":true},"startsAt":{"type":"string","maxLength":40,"nullable":true},"endsAt":{"type":"string","maxLength":40,"nullable":true},"active":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete an announcement","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/settings":{"get":{"summary":"IT Ops settings","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save IT Ops settings","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"refreshSeconds":{"type":"integer"},"rotation":{"type":"array","items":{"type":"string","maxLength":30},"maxItems":10},"rotateSeconds":{"type":"integer"},"staleMinutes":{"type":"integer"},"maintenanceWindow":{"type":"string","maxLength":160,"nullable":true},"supportPhone":{"type":"string","maxLength":40,"nullable":true},"ticketSystemName":{"type":"string","maxLength":80,"nullable":true},"showWeather":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/members":{"get":{"summary":"Who has IT Ops access","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Give someone IT Ops access","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200},"userId":{"type":"string","maxLength":64},"level":{"type":"string","enum":["viewer","operator","manager"]}},"required":["level"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/members/{id}":{"delete":{"summary":"Remove someone's IT Ops access","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/sources":{"get":{"summary":"Sources and their keys","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a source (push, MCP and webhook sources get a key, shown once)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["push","mcp","webhook","poller","http_check"]},"description":{"type":"string","maxLength":500,"nullable":true},"enabled":{"type":"boolean"},"format":{"type":"string","enum":["generic","alertmanager","uptime_kuma","grafana"],"nullable":true},"config":{},"secret":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/sources/{id}":{"patch":{"summary":"Edit a source","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["push","mcp","webhook","poller","http_check"]},"description":{"type":"string","maxLength":500,"nullable":true},"enabled":{"type":"boolean"},"format":{"type":"string","enum":["generic","alertmanager","uptime_kuma","grafana"],"nullable":true},"config":{},"secret":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Remove a source (its keys are revoked)","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/sources/{id}/test":{"post":{"summary":"Run a poller or HTTP check once (nothing is saved)","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/sources/preview":{"post":{"summary":"Preview a poller mapping against a sample response","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{},"sample":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/keys":{"post":{"summary":"Create an ingest key (shown once)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120},"scopes":{"type":"array","items":{"type":"string","enum":["ingest","read"]},"maxItems":2},"requestsPerMinute":{"type":"integer"}},"required":["sourceId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/keys/{id}":{"patch":{"summary":"Change an ingest key's rate limit (managers; audited)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":10,"maximum":1200}},"required":["requestsPerMinute"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/keys/{id}/revoke":{"post":{"summary":"Revoke an ingest key","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/displays":{"get":{"summary":"Wall display links","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Create a wall display link (shown once)","tags":["IT Ops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"expiresInDays":{"type":"integer","minimum":1,"maximum":3650,"nullable":true}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/displays/{id}/revoke":{"post":{"summary":"Revoke a wall display link","tags":["IT Ops"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/itops/ingest":{"post":{"summary":"Push observations, metrics, alerts, device flags and incidents (IT Ops ingest key)","tags":["IT Ops","Webhooks"],"requestBody":{"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/itops/webhooks/{format}":{"post":{"summary":"Inbound webhook adapters: generic, alertmanager, grafana, uptime_kuma (IT Ops ingest key)","tags":["IT Ops","Webhooks"],"requestBody":{"content":{"application/json":{"schema":{}}}},"parameters":[{"schema":{"type":"string","enum":["generic","alertmanager","grafana","uptime_kuma"]},"in":"path","name":"format","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/itops/mcp":{"post":{"summary":"MCP server (Streamable HTTP, JSON-RPC 2.0): initialize, tools/list, tools/call","tags":["IT Ops","MCP"],"requestBody":{"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}},"get":{"summary":"No server-initiated stream (405)","tags":["IT Ops","MCP"],"responses":{"405":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}},"delete":{"summary":"Stateless: no session to end (405)","tags":["IT Ops","MCP"],"responses":{"405":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/itops/display/overview":{"get":{"summary":"The wall for a TV display link (X-Itops-Display token, read only)","tags":["IT Ops"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/time/access":{"get":{"summary":"My level in Time & Attendance and the sidebar menu","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me":{"get":{"summary":"My time: status, today, this week, my locations","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me/timecard":{"get":{"summary":"My timecard for a week","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"week","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me/punch":{"post":{"summary":"Clock in / out from a phone or browser (location checked on the server)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["in","out","break_start","break_end"]},"location":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"accuracyM":{"type":"number"}},"required":["lat","lng","accuracyM"],"additionalProperties":false,"nullable":true},"locationError":{"type":"string","enum":["denied","unavailable","timeout","unsupported"],"nullable":true},"clientTime":{"type":"string","maxLength":40,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me/corrections":{"post":{"summary":"Ask for a correction to my time","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kind":{"type":"string","enum":["add","change","void"]},"punchId":{"type":"string","maxLength":64,"nullable":true},"punchType":{"type":"string","enum":["in","out","break_start","break_end"],"nullable":true},"proposedAt":{"type":"string","maxLength":40,"nullable":true},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["workDate","kind","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"All my correction requests","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","enum":["all","pending","approved","denied","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me/corrections/{id}/cancel":{"post":{"summary":"Withdraw my correction request","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/me/pin":{"put":{"summary":"Set my kiosk PIN (when the district allows PIN fallback)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pin":{"type":"string","minLength":4,"maxLength":8}},"required":["pin"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/overview":{"get":{"summary":"Dashboard: who is in now, late, missing punches, overtime, flagged locations","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/people":{"get":{"summary":"Search staff I cover (pickers)","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":100,"default":""},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/timecards":{"get":{"summary":"Timecards for a week (people I cover)","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"week","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["all","open","approved","locked","exceptions","overtime"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":10,"maximum":200},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/timecards/{personId}":{"get":{"summary":"One timecard: days, punches with location, edits, corrections","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"week","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/punches":{"post":{"summary":"Add a missing punch (supervisor; reason required)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64},"type":{"type":"string","enum":["in","out","break_start","break_end"]},"at":{"type":"string","maxLength":40},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["personId","type","at","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/punches/{id}":{"patch":{"summary":"Change a punch time or type (supervisor; reason required)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["in","out","break_start","break_end"]},"at":{"type":"string","maxLength":40},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/punches/{id}/void":{"post":{"summary":"Void (or restore) a punch (supervisor; reason required)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500},"restore":{"type":"boolean"}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/punches/{id}/reviewed":{"post":{"summary":"Mark a flagged / offline punch as checked","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/exceptions":{"get":{"summary":"Exceptions (missing punch, late, left early, long break, overtime, offline, absent)","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"kind","required":false},{"schema":{"type":"boolean"},"in":"query","name":"showDismissed","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/exceptions/dismiss":{"post":{"summary":"Mark an exception reviewed (or undo)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64},"workDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kind":{"type":"string","maxLength":30},"note":{"type":"string","maxLength":500,"nullable":true},"undo":{"type":"boolean"}},"required":["personId","workDate","kind"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/corrections":{"get":{"summary":"Correction requests from people I cover","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","enum":["all","pending","approved","denied","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/corrections/{id}/decide":{"post":{"summary":"Approve (applies the change) or deny a correction","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":500,"nullable":true},"at":{"type":"string","maxLength":40,"nullable":true},"type":{"type":"string","enum":["in","out","break_start","break_end"],"nullable":true}},"required":["approve"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/approvals":{"post":{"summary":"Approve weeks (supervisor)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"personIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":1000},"allowExceptions":{"type":"boolean"}},"required":["weekStart","personIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/approvals/reopen":{"post":{"summary":"Take back an approval (not once locked)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"personIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":1000}},"required":["weekStart","personIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/approvals/lock":{"post":{"summary":"Payroll: lock approved weeks (or HR: unlock)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"personIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":1000},"unlock":{"type":"boolean"}},"required":["weekStart"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/exports":{"post":{"summary":"Payroll export (CSV) of approved weeks; optionally lock them","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lock":{"type":"boolean"},"include":{"type":"string","enum":["approved","locked","both"]}},"required":["weekStart"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"Past payroll exports","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/exports/{id}/csv":{"get":{"summary":"Download a past payroll export again (CSV in data.csv)","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/reports":{"get":{"summary":"Reports: hours, overtime, tardiness, exceptions, locations","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"query","name":"school","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","enum":["hours","overtime","tardiness","exceptions","locations"],"default":"hours"},"in":"query","name":"kind","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","enum":["employee","department","school"]},"in":"query","name":"group","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/badges":{"get":{"summary":"Badges","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Issue a badge to an employee (replaces their current one)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64},"raw":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","maxLength":120,"nullable":true},"replace":{"type":"boolean"},"source":{"type":"string","enum":["manual","enrol"]}},"required":["personId","raw"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/badges/preview":{"post":{"summary":"What a reader value reads as, and who holds it","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":200}},"required":["raw"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/badges/{id}/status":{"post":{"summary":"Mark a badge lost or deactivated, or reactivate it","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["lost","deactivated","active"]},"note":{"type":"string","maxLength":300,"nullable":true}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/badges/import":{"post":{"summary":"Import badges from CSV (employee_id or email, badge); dry run first","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","maxLength":2000000},"dryRun":{"type":"boolean"}},"required":["csv"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/unknown-badges":{"get":{"summary":"Badges a clock did not recognise","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/unknown-badges/{id}/assign":{"post":{"summary":"Assign an unknown badge to an employee","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64}},"required":["personId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/unknown-badges/{id}/ignore":{"post":{"summary":"Ignore (or reopen) an unknown badge","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"undo":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/employees/{personId}":{"get":{"summary":"One employee: badges, history, locations, settings","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Tracked, pay type, clear PIN","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tracked":{"type":"boolean"},"payType":{"type":"string","enum":["hourly","salaried"]},"clearPin":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/employees/{personId}/locations":{"get":{"summary":"Where this employee may clock in","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Set the locations this employee may clock in at (empty = their school)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fenceIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50}},"required":["fenceIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosks":{"get":{"summary":"Time clocks","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a time clock (its link is shown once)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"schoolId":{"type":"string","maxLength":64,"nullable":true},"location":{"type":"string","maxLength":160,"nullable":true},"punchMode":{"type":"string","enum":["auto","buttons"],"nullable":true},"allowPin":{"type":"boolean","nullable":true},"allowedIpRanges":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20},"ipMode":{"type":"string","enum":["off","flag","refuse"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosks/{id}":{"patch":{"summary":"Edit a time clock (name, school, mode, network)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"schoolId":{"type":"string","maxLength":64,"nullable":true},"location":{"type":"string","maxLength":160,"nullable":true},"punchMode":{"type":"string","enum":["auto","buttons"],"nullable":true},"allowPin":{"type":"boolean","nullable":true},"allowedIpRanges":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20},"ipMode":{"type":"string","enum":["off","flag","refuse"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosks/{id}/rotate":{"post":{"summary":"New link for a clock (the old one stops working)","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosks/{id}/revoke":{"post":{"summary":"Switch a clock off","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosks/{id}/enrol":{"post":{"summary":"Capture the next badge tapped at this clock","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seconds":{"type":"integer","minimum":15,"maximum":300}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"Enrolment capture state","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Stop waiting for a badge","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/geofences":{"get":{"summary":"Geofences and DEP buildings","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a geofence","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"buildingId":{"type":"string","maxLength":64,"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"lat":{"type":"number"},"lng":{"type":"number"},"radiusM":{"type":"number"},"polygon":{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"number"},{"type":"number"}]},"maxItems":100,"nullable":true},"active":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/geofences/{id}":{"patch":{"summary":"Move / resize a geofence","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":160},"buildingId":{"type":"string","maxLength":64,"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"lat":{"type":"number"},"lng":{"type":"number"},"radiusM":{"type":"number"},"polygon":{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"number"},{"type":"number"}]},"maxItems":100,"nullable":true},"active":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Remove a geofence","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/geofences/geocode":{"post":{"summary":"Approximate a building from its town (then drag the pin)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string","maxLength":64}},"required":["buildingId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/schedules":{"get":{"summary":"Schedules","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a schedule","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"scope":{"type":"string","enum":["person","job_title","department","school","district"]},"personId":{"type":"string","maxLength":64,"nullable":true},"scopeValue":{"type":"string","maxLength":191,"nullable":true},"days":{"type":"object","additionalProperties":{"type":"object","properties":{"start":{"type":"string","maxLength":5},"end":{"type":"string","maxLength":5},"breakMinutes":{"type":"integer","minimum":0,"maximum":240}},"required":["start","end"],"additionalProperties":false,"nullable":true}},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["name","scope","days"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/schedules/{id}":{"patch":{"summary":"Edit a schedule","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"scope":{"type":"string","enum":["person","job_title","department","school","district"]},"personId":{"type":"string","maxLength":64,"nullable":true},"scopeValue":{"type":"string","maxLength":191,"nullable":true},"days":{"type":"object","additionalProperties":{"type":"object","properties":{"start":{"type":"string","maxLength":5},"end":{"type":"string","maxLength":5},"breakMinutes":{"type":"integer","minimum":0,"maximum":240}},"required":["start","end"],"additionalProperties":false,"nullable":true}},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Remove a schedule","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/settings":{"get":{"summary":"Rules, kiosk, badge reading and geofencing settings","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save settings (HR)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/members":{"get":{"summary":"Who has Time & Attendance access","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Give someone access (admin, supervisor, payroll, viewer)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200},"userId":{"type":"string","maxLength":64},"level":{"type":"string","enum":["admin","supervisor","payroll","viewer"]},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50},"departments":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":30}},"required":["level"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/members/{id}":{"delete":{"summary":"Remove someone’s access","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/entra":{"get":{"summary":"Microsoft Entra connector, sync runs and the review list","tags":["Time & Attendance"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save the Entra connector (the secret is sealed and never shown again)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"tenantId":{"type":"string","maxLength":100,"nullable":true},"clientId":{"type":"string","maxLength":100,"nullable":true},"clientSecret":{"type":"string","maxLength":400,"nullable":true},"secretExpiresOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"employeeIdAttribute":{"type":"string","maxLength":120},"badgeAttribute":{"type":"string","maxLength":120,"nullable":true},"groupId":{"type":"string","maxLength":100,"nullable":true},"nightlySync":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/entra/test":{"post":{"summary":"Test the Entra connection","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/entra/sync":{"post":{"summary":"Sync Entra users now","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/entra/users/{id}/match":{"post":{"summary":"Match an Entra user to a DEP person by hand, or ignore","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64,"nullable":true},"ignore":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/time/kiosk/config":{"get":{"summary":"Time clock configuration (kiosk device token)","tags":["Time & Attendance"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/time/kiosk/punch":{"post":{"summary":"Punch at a time clock: badge tap or PIN (kiosk device token)","tags":["Time & Attendance"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"badge":{"type":"string","maxLength":200},"type":{"type":"string","enum":["in","out","break_start","break_end"]},"deviceAt":{"type":"string","maxLength":40},"clientId":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9:_-]+$"},"offline":{"type":"boolean"},"pin":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"maxLength":50},"pin":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["employeeId","pin"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/me":{"get":{"summary":"My OmniSafe roles and the sidebar menu","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/dashboard":{"get":{"summary":"Home: what needs attention in my scope","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/schools":{"get":{"summary":"Schools (organization ids and names)","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/people/staff":{"get":{"summary":"Staff picker","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":100,"default":""},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/people/students":{"get":{"summary":"Student picker (for people involved in a case)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":100,"default":""},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports":{"get":{"summary":"Report queue (scope-filtered)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"type","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"urgency","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"flag","required":false},{"schema":{"type":"string","enum":["yes","no"]},"in":"query","name":"ack","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ref":{"type":"string"},"schoolId":{"type":"string"},"school":{"type":"string"},"type":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"status":{"type":"string","enum":["new","awaiting_review","under_review","accepted","referred","not_actionable"]},"urgency":{"type":"string","enum":["urgent","high","normal","low"],"nullable":true},"intakeFlag":{"type":"string","nullable":true},"reporterMode":{"type":"string","enum":["anonymous","identified"]},"reporterRole":{"type":"string","enum":["student","parent","staff","community","other"]},"channel":{"type":"string"},"language":{"type":"string"},"immediateDanger":{"type":"boolean"},"submittedAt":{"type":"string"},"acknowledgedAt":{"type":"string","nullable":true},"triagedAt":{"type":"string","nullable":true},"escalationOpen":{"type":"boolean"},"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"caseNumber":{"type":"string"}},"required":["id","caseNumber"],"additionalProperties":false}}},"required":["id","ref","schoolId","school","type","status","urgency","intakeFlag","reporterMode","reporterRole","channel","language","immediateDanger","submittedAt","acknowledgedAt","triagedAt","escalationOpen","cases"],"additionalProperties":false}}},"required":["page","pageSize","total","counts","rows"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Enter a report received in person or by phone","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","maxLength":64},"reporterMode":{"type":"string","enum":["anonymous","identified"]},"reporterRole":{"type":"string","enum":["student","parent","staff","community","other"]},"type":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"locationKind":{"type":"string","enum":["school","online","bus","off_campus","other"]},"locationDetail":{"type":"string","maxLength":500,"nullable":true},"approxDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"description":{"type":"string","minLength":10,"maxLength":8000},"people":{"type":"string","maxLength":2000,"nullable":true},"immediateDanger":{"type":"boolean"},"language":{"type":"string","enum":["en","es","pt","ht","ar","zh","hi","ko","pl","vi"]},"reporterName":{"type":"string","maxLength":200,"nullable":true},"reporterContact":{"type":"string","maxLength":200,"nullable":true}},"required":["schoolId","reporterMode","reporterRole","type","locationKind","description","immediateDanger"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}":{"get":{"summary":"One report (decrypted for authorised staff; the opening is recorded with its purpose)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":200,"default":"triage and follow-up"},"in":"query","name":"purpose","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Erase a report's content (refused while a legal hold covers it)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":300}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/acknowledge":{"post":{"summary":"Acknowledge a report (the only thing that stops its escalation)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/review":{"post":{"summary":"Start reviewing a report","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/triage":{"post":{"summary":"Human triage decision: open a case, link to a case, refer, or not actionable","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["open_case","link_case","refer","not_actionable"]},"urgency":{"type":"string","enum":["urgent","high","normal","low"]},"category":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"rationale":{"type":"string","minLength":10,"maxLength":4000},"policyId":{"type":"string","maxLength":64,"nullable":true},"caseId":{"type":"string","maxLength":64,"nullable":true},"referredTo":{"type":"string","maxLength":200,"nullable":true},"title":{"type":"string","maxLength":200,"nullable":true},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"backupUserId":{"type":"string","maxLength":64,"nullable":true},"workflow":{"type":"string","enum":["standard","nj_hib"]},"dueAt":{"type":"string","maxLength":40,"nullable":true}},"required":["decision","urgency","category","rationale"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/identity":{"post":{"summary":"Reveal the reporter of a named report (purpose required; recorded)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","minLength":5,"maxLength":200}},"required":["purpose"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/translation":{"put":{"summary":"Save a staff translation (the original is kept)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000}},"required":["text"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/reports/{id}/messages":{"post":{"summary":"Reply to the reporter through their follow-up code","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/evidence/{id}/link":{"get":{"summary":"A 5-minute download link for one clean file (bound to me)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/evidence/{id}/download":{"get":{"summary":"Download one evidence file (signed link + session)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"number"},"in":"query","name":"exp","required":true},{"schema":{"type":"string","maxLength":100},"in":"query","name":"sig","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/osafe/cases/{id}/evidence":{"post":{"summary":"Add an evidence file to a case (quarantined and scanned)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases":{"get":{"summary":"Cases I can see","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"state","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"boolean"},"in":"query","name":"mine","required":false},{"schema":{"type":"boolean"},"in":"query","name":"overdue","required":false},{"schema":{"type":"string","maxLength":12},"in":"query","name":"workflow","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"urgency","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"caseNumber":{"type":"string"},"title":{"type":"string"},"schoolId":{"type":"string"},"school":{"type":"string"},"category":{"type":"string"},"urgency":{"type":"string","enum":["urgent","high","normal","low"]},"state":{"type":"string","enum":["new","awaiting_review","under_review","accepted","referred","not_actionable","assigned","investigating","intervention_underway","pending_closure_review","closed","reopened"]},"workflow":{"type":"string","enum":["standard","nj_hib"]},"owner":{"type":"string","nullable":true},"backup":{"type":"string","nullable":true},"dueAt":{"type":"string","nullable":true},"openTasks":{"type":"number"},"nextTaskDue":{"type":"string","nullable":true},"overdue":{"type":"boolean"},"reports":{"type":"number"},"depLinked":{"type":"boolean"},"updatedAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","caseNumber","title","schoolId","school","category","urgency","state","workflow","owner","backup","dueAt","openTasks","nextTaskDue","overdue","reports","depLinked","updatedAt","createdAt"],"additionalProperties":false}}},"required":["page","pageSize","total","rows"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Open a case from accepted reports (or a staff concern with none)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20,"default":[]},"title":{"type":"string","minLength":3,"maxLength":200},"category":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"urgency":{"type":"string","enum":["urgent","high","normal","low"]},"schoolId":{"type":"string","maxLength":64},"workflow":{"type":"string","enum":["standard","nj_hib"],"default":"standard"},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"backupUserId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"submit":{"type":"boolean"}},"required":["title","category","urgency","schoolId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}":{"get":{"summary":"One case (notes filtered by partition; hidden ones counted)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Change title, category, urgency or due date (lead)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"category":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"urgency":{"type":"string","enum":["urgent","high","normal","low"]},"dueAt":{"type":"string","maxLength":40,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/transition":{"post":{"summary":"Move the case along its lifecycle (guarded)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["new","awaiting_review","under_review","accepted","referred","not_actionable","assigned","investigating","intervention_underway","pending_closure_review","closed","reopened"]},"reason":{"type":"string","maxLength":1000,"default":""}},"required":["to"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/assign":{"post":{"summary":"Assign owner, backup and due date","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ownerUserId":{"type":"string","maxLength":64},"backupUserId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true}},"required":["ownerUserId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/members":{"post":{"summary":"Add someone to the case","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"role":{"type":"string","enum":["owner","backup","investigator","counselor","contributor","viewer"]},"restrictedNotes":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/members/{memberId}":{"delete":{"summary":"Remove someone from the case","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/reports":{"post":{"summary":"Link another report (staff confirm; never automatic)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string","maxLength":64},"note":{"type":"string","maxLength":500,"nullable":true}},"required":["reportId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/people":{"post":{"summary":"Add a person involved","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","maxLength":200,"nullable":true},"role":{"type":"string","enum":["target","alleged_aggressor","witness","reporter","other"]},"visibility":{"type":"string","enum":["case_team","restricted"]}},"required":["role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/people/{personRowId}":{"delete":{"summary":"Remove a person involved (refused under legal hold)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"personRowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/tasks":{"post":{"summary":"Add a task","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"detail":{"type":"string","maxLength":2000,"nullable":true},"kind":{"type":"string","enum":["follow_up","interview","parent_contact","safety_plan","referral","documentation","other"]},"assigneeUserId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"required":{"type":"boolean"}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/tasks/{id}":{"patch":{"summary":"Update a task (the assignee may complete their own)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","done","cancelled"]},"dueAt":{"type":"string","maxLength":40,"nullable":true},"assigneeUserId":{"type":"string","maxLength":64,"nullable":true},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/tasks":{"get":{"summary":"My tasks","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","enum":["open","done","all"],"default":"open"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string","nullable":true},"kind":{"type":"string","enum":["follow_up","interview","parent_contact","safety_plan","referral","documentation","other"]},"status":{"type":"string","enum":["open","done","cancelled"]},"dueAt":{"type":"string","nullable":true},"overdue":{"type":"boolean"},"caseId":{"type":"string"},"caseNumber":{"type":"string"},"school":{"type":"string"},"canOpenCase":{"type":"boolean"},"completedAt":{"type":"string","nullable":true}},"required":["id","title","detail","kind","status","dueAt","overdue","caseId","caseNumber","school","canOpenCase","completedAt"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/osafe/cases/{id}/notes":{"post":{"summary":"Add a note in a sensitivity partition","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sensitivity":{"type":"string","enum":["general","investigation","counseling","restricted"]},"body":{"type":"string","minLength":2,"maxLength":8000}},"required":["sensitivity","body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/notes/{id}/correct":{"post":{"summary":"Append a correction (the original stays)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":2,"maxLength":8000},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["body","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/plans":{"post":{"summary":"Add a safety / intervention / support plan","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["safety_plan","intervention","support","restorative"]},"title":{"type":"string","minLength":3,"maxLength":200},"goals":{"type":"string","maxLength":4000,"nullable":true},"actions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"due":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"done":{"type":"boolean"}},"required":["text"],"additionalProperties":false},"maxItems":30,"default":[]},"reviewOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["draft","active","completed","discontinued"]}},"required":["kind","title"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/plans/{id}":{"patch":{"summary":"Update a plan (new version)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"goals":{"type":"string","maxLength":4000,"nullable":true},"actions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"due":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"done":{"type":"boolean"}},"required":["text"],"additionalProperties":false},"maxItems":30},"status":{"type":"string","enum":["draft","active","completed","discontinued"]},"reviewOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/request-closure":{"post":{"summary":"Ask for closure (closeout checklist)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"checklist":{"type":"object","additionalProperties":{"type":"string","enum":["yes","no","not_applicable"]}},"reason":{"type":"string","minLength":10,"maxLength":2000}},"required":["checklist","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/review-closure":{"post":{"summary":"Approve closure or send it back (lead; not the requester)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":1000,"default":""},"backTo":{"type":"string","enum":["assigned","investigating","intervention_underway"]}},"required":["approve"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/reopen":{"post":{"summary":"Reopen a closed case (reason required)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/escalate":{"post":{"summary":"Start the on-call escalation for this case","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300,"default":""}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib":{"post":{"summary":"Start the NJ HIB workflow on a case","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"specialistUserId":{"type":"string","maxLength":64},"reportedToPrincipalOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"policyId":{"type":"string","maxLength":64,"nullable":true}},"required":["specialistUserId","reportedToPrincipalOn"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/milestones/{key}":{"post":{"summary":"Mark a milestone done, or override its date with a justification","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"done":{"type":"boolean"},"overrideOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"overrideReason":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":40},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/log":{"post":{"summary":"Add to the investigation log","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"occurredAt":{"type":"string","maxLength":40},"kind":{"type":"string","enum":["interview","evidence_review","contact","meeting","other"]},"summary":{"type":"string","minLength":3,"maxLength":8000}},"required":["occurredAt","kind","summary"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/findings":{"put":{"summary":"Save or submit the findings for review","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":3,"maxLength":20000},"submit":{"type":"boolean","default":false}},"required":["text"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/review":{"post":{"summary":"Review findings and record the staff determination","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"determination":{"type":"string","enum":["hib_confirmed","not_hib","inconclusive"]},"note":{"type":"string","minLength":10,"maxLength":2000}},"required":["determination","note"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/board":{"post":{"summary":"Board meeting date / prepare the board report line","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"boardMeetingOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"prepare":{"type":"boolean"},"included":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"The de-identified board report line","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/hib/notices":{"post":{"summary":"Prepare a parent / guardian notice (staff send it)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"party":{"type":"string","enum":["target_guardian","aggressor_guardian"]},"kind":{"type":"string","enum":["investigation_started","outcome","appeal_rights","other"]},"method":{"type":"string","enum":["letter","phone","meeting","portal","email"]},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":4000,"nullable":true}},"required":["party","kind","method"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/notices/{id}":{"post":{"summary":"Approve a notice, or record it as sent","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","record_sent"]},"sentAt":{"type":"string","maxLength":40,"nullable":true},"method":{"type":"string","enum":["letter","phone","meeting","portal","email"],"nullable":true}},"required":["action"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/cases/{id}/dep-link":{"post":{"summary":"Escalate into (or link) a DEP discipline incident + HIB investigation","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["create","link"]},"incidentId":{"type":"string","maxLength":64,"nullable":true},"incidentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"location":{"type":"string","maxLength":200,"nullable":true}},"required":["mode"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/dep-incidents":{"get":{"summary":"Recent DEP HIB incidents (to link)","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/escalations":{"get":{"summary":"Escalations with every delivery attempt","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":15},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/escalations/{id}/acknowledge":{"post":{"summary":"Acknowledge an escalation (a person, not a delivery receipt)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/notifications":{"get":{"summary":"My OmniSafe notices","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"unread","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/notifications/read":{"post":{"summary":"Mark one (or all) notices read","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":64,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/ai/runs":{"post":{"summary":"Ask for an AI draft (background job; staff approve the result)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskType":{"type":"string","enum":["summary","translate","duplicates","tasks","trends"]},"targetType":{"type":"string","enum":["report","case","district"]},"targetId":{"type":"string","maxLength":64,"nullable":true}},"required":["taskType","targetType"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"get":{"summary":"AI runs I can see, with review metrics","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":10},"in":"query","name":"targetType","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"targetId","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/ai/runs/{id}":{"get":{"summary":"One AI run (draft, marked unverified)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/ai/runs/{id}/retry":{"post":{"summary":"Retry a failed run","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/ai/runs/{id}/review":{"post":{"summary":"Approve, edit or reject a draft","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","edit","reject"]},"editedText":{"type":"string","maxLength":20000,"nullable":true},"taskKeys":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"dueOverrides":{"type":"object","additionalProperties":{"type":"string","maxLength":40}}},"required":["decision"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/climate":{"get":{"summary":"KPIs and report-type mix (small cells suppressed)","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/climate/export":{"post":{"summary":"Export the KPIs as CSV (audited)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"schoolId":{"type":"string","maxLength":64},"purpose":{"type":"string","minLength":5,"maxLength":300}},"required":["purpose"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/settings":{"get":{"summary":"District OmniSafe settings","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Change district OmniSafe settings","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"anonymousEnabled":{"type":"boolean"},"identifiedEnabled":{"type":"boolean"},"followUpEnabled":{"type":"boolean"},"studentContactPermitted":{"type":"boolean"},"emergencyCopy":{"type":"string","minLength":20,"maxLength":2000},"confidentialityCopy":{"type":"string","minLength":20,"maxLength":2000},"outOfHoursCopy":{"type":"string","minLength":10,"maxLength":2000},"businessHours":{"type":"object","additionalProperties":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string","pattern":"^\\d{2}:\\d{2}$"},{"type":"string","pattern":"^\\d{2}:\\d{2}$"}]}},"ackThresholds":{"type":"object","additionalProperties":{"type":"integer","minimum":5,"maximum":20160}},"escalationStepMinutes":{"type":"integer","minimum":5,"maximum":1440},"smallCellThreshold":{"type":"integer","minimum":2,"maximum":50},"retention":{"type":"object","additionalProperties":{"type":"integer","minimum":30,"maximum":36500}},"reportTypes":{"type":"array","items":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"minItems":1},"languages":{"type":"array","items":{"type":"string","enum":["en","es","pt","ht","ar","zh","hi","ko","pl","vi"]},"minItems":1},"statusCopy":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"templates":{"type":"object","additionalProperties":{"type":"object","properties":{"title":{"type":"string","maxLength":200}},"required":["title"],"additionalProperties":false}},"aiEnabled":{"type":"boolean"},"aiFeatures":{"type":"object","additionalProperties":{"type":"boolean"}},"hibEnabled":{"type":"boolean"},"hibValidationNote":{"type":"string","maxLength":1000,"nullable":true},"externalDelivery":{"type":"boolean"},"brandColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/team":{"get":{"summary":"The OmniSafe team","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Add or change a team member (membership is the module grant)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"roles":{"type":"array","items":{"type":"string","maxLength":20},"maxItems":7},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"active":{"type":"boolean"}},"required":["userId","roles","schoolIds","active"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/contacts":{"get":{"summary":"On-call / escalation contacts","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add an on-call contact","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","maxLength":64,"nullable":true},"userId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","minLength":2,"maxLength":120},"roleLabel":{"type":"string","maxLength":120,"nullable":true},"channel":{"type":"string","enum":["in_app","email","sms"]},"address":{"type":"string","maxLength":200,"nullable":true},"tier":{"type":"integer","minimum":1,"maximum":5},"coverage":{"type":"string","enum":["business_hours","after_hours","always"]},"isFallback":{"type":"boolean"},"active":{"type":"boolean"}},"required":["name","channel","tier","coverage","isFallback","active"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/contacts/{id}":{"put":{"summary":"Change an on-call contact","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","maxLength":64,"nullable":true},"userId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","minLength":2,"maxLength":120},"roleLabel":{"type":"string","maxLength":120,"nullable":true},"channel":{"type":"string","enum":["in_app","email","sms"]},"address":{"type":"string","maxLength":200,"nullable":true},"tier":{"type":"integer","minimum":1,"maximum":5},"coverage":{"type":"string","enum":["business_hours","after_hours","always"]},"isFallback":{"type":"boolean"},"active":{"type":"boolean"}},"required":["name","channel","tier","coverage","isFallback","active"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/links":{"get":{"summary":"School report links and QR codes","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Create or rotate a school link (the old one stops working)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schoolId":{"type":"string","maxLength":64},"deactivate":{"type":"boolean"}},"required":["schoolId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/policies":{"get":{"summary":"Policy versions","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Start a new draft version","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["triage","hib_nj","escalation","confidentiality","retention"]},"title":{"type":"string","minLength":3,"maxLength":200},"body":{"type":"string","minLength":10,"maxLength":20000},"rules":{"type":"object","additionalProperties":{},"default":{}},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"changeNote":{"type":"string","maxLength":1000,"nullable":true}},"required":["kind","title","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/policies/{id}":{"put":{"summary":"Edit a draft (published versions never change)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":20000},"rules":{"type":"object","additionalProperties":{}},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"changeNote":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/policies/{id}/publish":{"post":{"summary":"Approve and publish (a second person; the previous version retires)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"justification":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/holds":{"get":{"summary":"Legal holds and the retention schedule","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Place a legal hold","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["report","case","evidence","district"]},"entityId":{"type":"string","maxLength":64,"nullable":true},"caseNumber":{"type":"string","maxLength":20,"nullable":true},"ref":{"type":"string","maxLength":20,"nullable":true},"authority":{"type":"string","minLength":3,"maxLength":200},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["entityType","authority","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/holds/{id}/release":{"post":{"summary":"Release a legal hold","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/retention":{"post":{"summary":"Preview or run the report retention schedule (holds always win)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"boolean","default":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/audit":{"get":{"summary":"The tamper-evident timeline with chain verification","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"type","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/exports":{"get":{"summary":"Past exports with their hashes","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/exports/district":{"post":{"summary":"The district's full OmniSafe data export (audited)","tags":["OmniSafe AI"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","minLength":10,"maxLength":300}},"required":["purpose"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/health":{"get":{"summary":"System health: chain, scanner, deliveries, AI","tags":["OmniSafe AI"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/osafe/public/links/{code}":{"get":{"summary":"The school reporting page (public)","tags":["OmniSafe AI (public)"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/public/challenge":{"post":{"summary":"Proof-of-work challenge for the report form (public)","tags":["OmniSafe AI (public)"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":40}},"required":["code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/public/reports":{"post":{"summary":"Send a report (public; anonymous or named)","tags":["OmniSafe AI (public)"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":8,"maxLength":24},"challenge":{"type":"string","minLength":10,"maxLength":600},"nonce":{"type":"string","minLength":1,"maxLength":40},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9-]{20,64}$"},"website":{"type":"string","maxLength":200},"mode":{"type":"string","enum":["anonymous","identified"]},"reporterRole":{"type":"string","enum":["student","parent","staff","community","other"]},"type":{"type":"string","enum":["cyberbullying","bullying","harassment","threat","image_sharing","discrimination","self_harm_concern","weapon","substance","safety_other"]},"locationKind":{"type":"string","enum":["school","online","bus","off_campus","other"]},"locationDetail":{"type":"string","maxLength":500,"nullable":true},"approxDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"approxDateText":{"type":"string","maxLength":80,"nullable":true},"description":{"type":"string","minLength":10,"maxLength":8000},"language":{"type":"string","enum":["en","es","pt","ht","ar","zh","hi","ko","pl","vi"]},"people":{"type":"string","maxLength":2000,"nullable":true},"immediateDanger":{"type":"boolean"},"identity":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"nullable":true},"contact":{"type":"string","maxLength":200,"nullable":true},"detail":{"type":"string","maxLength":300,"nullable":true}},"additionalProperties":false,"nullable":true}},"required":["code","challenge","nonce","idempotencyKey","mode","reporterRole","type","locationKind","description","language","immediateDanger"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/public/reports/{ref}/evidence":{"post":{"summary":"Add one file to a report (public; upload ticket)","tags":["OmniSafe AI (public)"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"path","name":"ref","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/public/status":{"post":{"summary":"Check a report with its reference and code (public; limited answer)","tags":["OmniSafe AI (public)"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":6,"maxLength":20},"token":{"type":"string","minLength":20,"maxLength":40}},"required":["ref","token"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/public/messages":{"post":{"summary":"Send more information on a report (public; claim token)","tags":["OmniSafe AI (public)"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":6,"maxLength":20},"token":{"type":"string","minLength":20,"maxLength":40},"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["ref","token","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/osafe/dep-link/incidents/{id}":{"get":{"summary":"Is an OmniSafe case linked to this DEP incident?","tags":["OmniSafe AI"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/access":{"get":{"summary":"My Teacher Command Center roles and the sidebar menu","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/dashboard":{"get":{"summary":"Teacher dashboard summary (today, to review, tasks, notifications, generations)","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/classes":{"get":{"summary":"My assigned classes (from DEP sections and rosters)","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/classes/{id}":{"get":{"summary":"One of my classes: roster, attendance summary, assessment summaries","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/classes/{id}/students":{"get":{"summary":"Authorized roster of one of my classes","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/classes/{id}/students/{personId}":{"get":{"summary":"Student profile (a student in my class; read only)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"personId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/standards":{"get":{"summary":"District-approved NJSLS standards (search)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"subject","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"grade","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"setId","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/standards/validate":{"post":{"summary":"Validate standard codes against the approved catalog","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30}},"required":["codes"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/standards/sets":{"get":{"summary":"Catalog versions and the district adoption of each","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/standards/sets/{id}/adoption":{"post":{"summary":"Approve or retire a catalog version for the district (curriculum admin)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"}},"required":["approve"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/lessons":{"get":{"summary":"My lessons","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"anyOf":[{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]},{"type":"string","enum":["all"]}]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"standard","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"sectionId","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Create a lesson (written by the teacher)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"durationMinutes":{"type":"integer","minimum":10,"maximum":240},"topic":{"type":"string","minLength":2,"maxLength":255},"objective":{"type":"string","maxLength":2000,"nullable":true},"strategy":{"type":"string","maxLength":80,"nullable":true},"learnerLevels":{"type":"array","items":{"type":"string","maxLength":20},"maxItems":8},"resourcesAvailable":{"type":"string","maxLength":2000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"sections":{"type":"object","required":["objectives","standards","materials","opening","direct","guided","independent","differentiation","formative","exitTicket"],"properties":{"objectives":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"standards":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"materials":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"opening":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"direct":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"guided":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"independent":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"differentiation":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"formative":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"exitTicket":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false}},"additionalProperties":false},"teacherNotes":{"type":"string","maxLength":2000,"nullable":true}},"required":["subject","gradeLevel","durationMinutes","topic"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/lessons/generate":{"post":{"summary":"Start AI lesson generation (background job; poll /tcc/jobs/:id)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"durationMinutes":{"type":"integer","minimum":10,"maximum":240},"topic":{"type":"string","minLength":2,"maxLength":255},"objective":{"type":"string","maxLength":2000,"nullable":true},"strategy":{"type":"string","maxLength":80,"nullable":true},"learnerLevels":{"type":"array","items":{"type":"string","maxLength":20},"maxItems":8},"resourcesAvailable":{"type":"string","maxLength":2000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"sections":{"type":"object","required":["objectives","standards","materials","opening","direct","guided","independent","differentiation","formative","exitTicket"],"properties":{"objectives":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"standards":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"materials":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"opening":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"direct":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"guided":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"independent":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"differentiation":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"formative":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"exitTicket":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false}},"additionalProperties":false},"teacherNotes":{"type":"string","maxLength":2000,"nullable":true}},"required":["subject","gradeLevel","durationMinutes","topic"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lesson":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"jobId":{"type":"string"}},"required":["lesson","jobId"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/lessons/{id}":{"get":{"summary":"A lesson with its ten sections, standards and versions","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a lesson (any section); saves a new version","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"durationMinutes":{"type":"integer","minimum":10,"maximum":240},"topic":{"type":"string","minLength":2,"maxLength":255},"objective":{"type":"string","maxLength":2000,"nullable":true},"strategy":{"type":"string","maxLength":80,"nullable":true},"learnerLevels":{"type":"array","items":{"type":"string","maxLength":20},"maxItems":8},"resourcesAvailable":{"type":"string","maxLength":2000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"sections":{"type":"object","required":["objectives","standards","materials","opening","direct","guided","independent","differentiation","formative","exitTicket"],"properties":{"objectives":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"standards":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"materials":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"opening":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"direct":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"guided":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"independent":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"differentiation":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"formative":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false},"exitTicket":{"type":"object","properties":{"body":{"type":"string","maxLength":20000},"minutes":{"type":"integer","minimum":0,"maximum":240,"nullable":true}},"additionalProperties":false}},"additionalProperties":false},"teacherNotes":{"type":"string","maxLength":2000,"nullable":true},"changeNote":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a lesson","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/status":{"post":{"summary":"Move a lesson through Draft → Teacher review → Approved → Scheduled → Completed → Archived","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]},"scheduledFor":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/sections/{section}/regenerate":{"post":{"summary":"Regenerate one section with AI (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["objectives","standards","materials","opening","direct","guided","independent","differentiation","formative","exitTicket"]},"in":"path","name":"section","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/duplicate":{"post":{"summary":"Duplicate a lesson as a new draft","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/versions/{version}":{"get":{"summary":"One saved version of a lesson","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"integer","minimum":1},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/versions/{version}/restore":{"post":{"summary":"Restore a saved version (as a new version)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"integer","minimum":1},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","scheduled","completed","archived"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/jobs":{"get":{"summary":"My recent AI generation jobs","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"kind","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"take","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"kind":{"type":"string","enum":["lesson","lesson_section","assignment","assessment","questions","adapt","grading","insights","parent_message","translate","summarize"]}},"required":["status","kind"],"additionalProperties":true}},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/jobs/{id}":{"get":{"summary":"AI generation job status","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"kind":{"type":"string","enum":["lesson","lesson_section","assignment","assessment","questions","adapt","grading","insights","parent_message","translate","summarize"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/jobs/{id}/cancel":{"post":{"summary":"Cancel a queued or running generation","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"kind":{"type":"string","enum":["lesson","lesson_section","assignment","assessment","questions","adapt","grading","insights","parent_message","translate","summarize"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/jobs/{id}/retry":{"post":{"summary":"Retry a failed generation","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"kind":{"type":"string","enum":["lesson","lesson_section","assignment","assessment","questions","adapt","grading","insights","parent_message","translate","summarize"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/usage":{"get":{"summary":"AI usage summary (mine, or the district for administrators)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["me","district"]},"in":"query","name":"scope","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/settings":{"get":{"summary":"District AI controls and module rules","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Change district AI controls (district administrators)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"aiEnabled":{"type":"boolean"},"aiFeatures":{"type":"object","additionalProperties":{"type":"boolean"}},"allowPiiAttach":{"type":"boolean"},"parentApproval":{"type":"boolean"},"parentEmail":{"type":"boolean"},"monthlyTokenLimit":{"type":"integer","minimum":0,"maximum":100000000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/members":{"get":{"summary":"Curriculum administrators and coaches","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Add a curriculum administrator or coach (district administrators)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"role":{"type":"string","enum":["curriculum_admin","coach"]},"schoolIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50}},"required":["userId","role"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/members/{id}":{"delete":{"summary":"Remove a module role","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/schools":{"get":{"summary":"Schools of the district (coach scope picker)","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/staff":{"get":{"summary":"Search staff (for module roles)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":100,"default":""},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/preferences":{"get":{"summary":"My profile, preferences and accessibility settings","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Save my preferences","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"number"},{"type":"boolean"}]}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/lessons/{id}/export":{"get":{"summary":"Export a lesson as PDF or DOCX","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["pdf","docx"],"default":"pdf"},"in":"query","name":"format","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tcc/lessons/{id}/library":{"post":{"summary":"Save the lesson to the Resource Library","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","school","district"]},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"publishNote":{"type":"string","maxLength":1000,"nullable":true}},"required":["visibility"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments":{"get":{"summary":"My assignments","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"anyOf":[{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},{"type":"string","enum":["all"]}]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"kind","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"sectionId","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Create an assignment (written by the teacher)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"topic":{"type":"string","maxLength":255,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"estimatedMinutes":{"type":"integer","minimum":1,"maximum":600,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"content":{}},"required":["kind","subject","gradeLevel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/generate":{"post":{"summary":"Generate an assignment with foundational / grade-level / enrichment versions (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"topic":{"type":"string","maxLength":255,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"estimatedMinutes":{"type":"integer","minimum":1,"maximum":600,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"content":{},"itemCount":{"type":"integer","minimum":3,"maximum":20},"sourceText":{"type":"string","maxLength":20000,"nullable":true},"sourceResourceId":{"type":"string","maxLength":64,"nullable":true},"includeRubric":{"type":"boolean"}},"required":["kind","subject","gradeLevel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignment":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"jobId":{"type":"string"}},"required":["assignment","jobId"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/adapt":{"post":{"summary":"Convert material into instructional levels (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"sourceText":{"type":"string","maxLength":20000,"nullable":true},"resourceId":{"type":"string","maxLength":64,"nullable":true},"assignmentId":{"type":"string","maxLength":64,"nullable":true},"levels":{"type":"array","items":{"type":"string","enum":["foundational","grade_level","enrichment"]},"maxItems":3},"sectionId":{"type":"string","maxLength":64,"nullable":true}},"required":["title","subject","gradeLevel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assignment":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"jobId":{"type":"string"}},"required":["assignment","jobId"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/{id}":{"get":{"summary":"An assignment with its versions","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit an assignment","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"topic":{"type":"string","maxLength":255,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"estimatedMinutes":{"type":"integer","minimum":1,"maximum":600,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"content":{}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an assignment","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assignments/{id}/variants/{level}":{"put":{"summary":"Edit (or add) one differentiated version","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"content":{},"selected":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["foundational","grade_level","enrichment"]},"in":"path","name":"level","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove one version","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["foundational","grade_level","enrichment"]},"in":"path","name":"level","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/{id}/status":{"post":{"summary":"Review, approve, publish (needs approval) or archive","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/{id}/duplicate":{"post":{"summary":"Duplicate an assignment","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["homework","worksheet","reading_comprehension","vocabulary","math_practice","writing_prompt","project"]}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assignments/{id}/export":{"get":{"summary":"Export as PDF or DOCX (one version, or every selected version; optional answer key)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["pdf","docx"],"default":"pdf"},"in":"query","name":"format","required":false},{"schema":{"type":"string","enum":["foundational","grade_level","enrichment"]},"in":"query","name":"level","required":false},{"schema":{"type":"string","enum":["true","false","1","0"]},"in":"query","name":"key","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tcc/assignments/{id}/library":{"post":{"summary":"Save the assignment to the Resource Library (beyond private needs approval)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","school","district"]},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"publishNote":{"type":"string","maxLength":1000,"nullable":true}},"required":["visibility"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments":{"get":{"summary":"My assessments","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"anyOf":[{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},{"type":"string","enum":["all"]}]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"kind","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"sectionId","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]}},"required":["status","kind"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Create an assessment (questions added by the teacher or from the bank)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"difficulty":{"type":"string","enum":["easy","medium","hard","mixed"]},"timeMinutes":{"type":"integer","minimum":1,"maximum":300,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"settings":{"type":"object","properties":{"questionTypes":{"type":"array","items":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"maxItems":6},"count":{"type":"integer","minimum":1,"maximum":40},"includeRubric":{"type":"boolean"}},"additionalProperties":false}},"required":["title","subject","gradeLevel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/generate":{"post":{"summary":"Generate an assessment, answer key and rubric (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"difficulty":{"type":"string","enum":["easy","medium","hard","mixed"]},"timeMinutes":{"type":"integer","minimum":1,"maximum":300,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"settings":{"type":"object","properties":{"questionTypes":{"type":"array","items":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"maxItems":6},"count":{"type":"integer","minimum":1,"maximum":40},"includeRubric":{"type":"boolean"}},"additionalProperties":false},"topic":{"type":"string","maxLength":255,"nullable":true},"sourceText":{"type":"string","maxLength":20000,"nullable":true}},"required":["title","subject","gradeLevel"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assessment":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]}},"required":["status","kind"],"additionalProperties":true},"jobId":{"type":"string"}},"required":["assessment","jobId"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}":{"get":{"summary":"An assessment with its questions, key and rubric","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit assessment settings","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"subject":{"type":"string","minLength":1,"maxLength":60},"gradeLevel":{"type":"string","minLength":1,"maxLength":10},"difficulty":{"type":"string","enum":["easy","medium","hard","mixed"]},"timeMinutes":{"type":"integer","minimum":1,"maximum":300,"nullable":true},"instructions":{"type":"string","maxLength":4000,"nullable":true},"sectionId":{"type":"string","maxLength":64,"nullable":true},"lessonId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"settings":{"type":"object","properties":{"questionTypes":{"type":"array","items":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"maxItems":6},"count":{"type":"integer","minimum":1,"maximum":40},"includeRubric":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an assessment","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/questions":{"post":{"summary":"Add a question (also saved to the bank)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"content":{"type":"object","additionalProperties":{}},"answerKey":{"type":"object","additionalProperties":{}},"rubric":{},"points":{"type":"integer","minimum":1,"maximum":50},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"explanation":{"type":"string","maxLength":2000,"nullable":true},"bankScope":{"type":"string","enum":["private","school","district"]},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30}},"required":["type","prompt"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/questions/generate":{"post":{"summary":"Generate more questions into this assessment (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":20},"questionTypes":{"type":"array","items":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"maxItems":6},"instruction":{"type":"string","maxLength":1000,"nullable":true}},"required":["count"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/questions/{questionId}":{"patch":{"summary":"Edit a question (a colleague’s bank question is copied first)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"content":{"type":"object","additionalProperties":{}},"answerKey":{"type":"object","additionalProperties":{}},"rubric":{},"points":{"type":"integer","minimum":1,"maximum":50},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"explanation":{"type":"string","maxLength":2000,"nullable":true},"bankScope":{"type":"string","enum":["private","school","district"]},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"questionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a question from this assessment (it stays in the bank)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"questionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/order":{"put":{"summary":"Reorder questions","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100}},"required":["questionIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/bank":{"post":{"summary":"Reuse questions from the bank","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"questionIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":50}},"required":["questionIds"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/status":{"post":{"summary":"Review, approve, publish (needs approval) or archive","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/duplicate":{"post":{"summary":"Duplicate an assessment","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","teacher_review","approved","published","archived"]},"kind":{"type":"string","enum":["quiz","exit_ticket","unit_test","pre_assessment","practice"]},"items":{"type":"array","items":{"type":"object","properties":{"question":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}},"required":["question"],"additionalProperties":true}}},"required":["status","kind"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assessments/{id}/export":{"get":{"summary":"Printable PDF / DOCX: student copy, answer key, or both","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["pdf","docx"],"default":"pdf"},"in":"query","name":"format","required":false},{"schema":{"type":"string","enum":["student","key","both"],"default":"both"},"in":"query","name":"part","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tcc/assessments/{id}/library":{"post":{"summary":"Save the assessment to the Resource Library","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","school","district"]},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"publishNote":{"type":"string","maxLength":1000,"nullable":true}},"required":["visibility"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/questions":{"get":{"summary":"Question bank (mine, my school’s, the district’s)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"type","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"subject","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"gradeLevel","required":false},{"schema":{"type":"string","enum":["mine","school","district","all"]},"in":"query","name":"scope","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"standard","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["multiple_choice","true_false","short_answer","extended_response","matching","fill_blank"]},"bankScope":{"type":"string","enum":["private","school","district"]}},"required":["type","bankScope"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/questions/{id}":{"patch":{"summary":"Share a bank question with my school (or district, curriculum admins)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bankScope":{"type":"string","enum":["private","school","district"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete a question from my bank","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/resources":{"get":{"summary":"Search the library (mine, saved, shared, school, district)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["mine","saved","shared","school","district","all"]},"in":"query","name":"tab","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"kind","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"subject","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"grade","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"standard","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":5,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Save a resource (district scope goes to curriculum review)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"subject":{"type":"string","maxLength":60,"nullable":true},"gradeLevels":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":13},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"url":{"type":"string","maxLength":1000,"nullable":true},"body":{"type":"string","maxLength":200000,"nullable":true},"linkedType":{"type":"string","enum":["lesson","assignment","assessment"],"nullable":true},"linkedId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"publishNote":{"type":"string","maxLength":1000,"nullable":true}},"required":["title","kind"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/resources/{id}":{"get":{"summary":"A library item with versions, sharing and approval","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit (new version) or change who can see it","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"subject":{"type":"string","maxLength":60,"nullable":true},"gradeLevels":{"type":"array","items":{"type":"string","maxLength":10},"maxItems":13},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"url":{"type":"string","maxLength":1000,"nullable":true},"body":{"type":"string","maxLength":200000,"nullable":true},"linkedType":{"type":"string","enum":["lesson","assignment","assessment"],"nullable":true},"linkedId":{"type":"string","maxLength":64,"nullable":true},"standardCodes":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":30},"publishNote":{"type":"string","maxLength":1000,"nullable":true},"changeNote":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a library item","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/resources/{id}/file":{"post":{"summary":"Upload a file (multipart, field \"file\"); creates a new version","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"get":{"summary":"Download the file (optionally an older version)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"integer","minimum":1},"in":"query","name":"version","required":false},{"schema":{"type":"boolean"},"in":"query","name":"inline","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tcc/resources/{id}/versions/{version}/restore":{"post":{"summary":"Restore an older version","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"integer","minimum":1},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/resources/{id}/share":{"post":{"summary":"Share with a named colleague","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"permission":{"type":"string","enum":["view","edit"]}},"required":["userId","permission"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/resources/{id}/share/{userId}":{"delete":{"summary":"Stop sharing with a colleague","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson_plan","assignment","assessment","document","link","note","curriculum","policy"]},"visibility":{"type":"string","enum":["private","school","district"]},"districtStatus":{"type":"string","enum":["none","pending","approved","rejected"]}},"required":["kind","visibility","districtStatus"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/resources/{id}/save":{"post":{"summary":"Save to (or remove from) My Library","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean"}},"required":["saved"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/colleagues":{"get":{"summary":"Search colleagues to share with","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":100,"default":""},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/approvals":{"get":{"summary":"Approvals: my requests, the queue waiting for me, or decided","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["mine","queue","decided"]},"in":"query","name":"box","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"kind","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","rejected","withdrawn"]}},"required":["status"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/approvals/{id}/decide":{"post":{"summary":"Approve or reject (curriculum admin for the district library; principal for parent messages)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":2000,"nullable":true}},"required":["approve"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","rejected","withdrawn"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/workflow":{"get":{"summary":"Workflow Center: tasks, drafts, approvals and generations","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/drafts":{"get":{"summary":"Drafts in progress across the studios","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/tasks":{"get":{"summary":"My tasks and reminders","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","enum":["open","done","all"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["today","week","overdue"]},"in":"query","name":"due","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["open","done","cancelled"]}},"required":["status"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Add a task or reminder","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["task","reminder","review","grading","follow_up","planning"]},"priority":{"type":"string","enum":["low","normal","high"]},"dueAt":{"type":"string","maxLength":40,"nullable":true},"remindAt":{"type":"string","maxLength":40,"nullable":true},"linkedType":{"type":"string","maxLength":20,"nullable":true},"linkedId":{"type":"string","maxLength":64,"nullable":true}},"required":["title"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["open","done","cancelled"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/tasks/{id}":{"patch":{"summary":"Edit, complete or reopen a task","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"notes":{"type":"string","maxLength":4000,"nullable":true},"kind":{"type":"string","enum":["task","reminder","review","grading","follow_up","planning"]},"priority":{"type":"string","enum":["low","normal","high"]},"dueAt":{"type":"string","maxLength":40,"nullable":true},"remindAt":{"type":"string","maxLength":40,"nullable":true},"linkedType":{"type":"string","maxLength":20,"nullable":true},"linkedId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","enum":["open","done","cancelled"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["open","done","cancelled"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a task","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/notifications":{"get":{"summary":"My Teacher Command Center notifications","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"unread","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/notifications/read":{"post":{"summary":"Mark notifications read","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"all":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assistant/conversations":{"get":{"summary":"My assistant conversations","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"archived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assistant/conversations/{id}":{"get":{"summary":"A conversation with its messages and attached documents","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["running","done","error"]}},"required":["status"],"additionalProperties":true}}},"required":["messages"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename, archive, attach or detach library documents","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"archived":{"type":"boolean"},"attach":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5},"detach":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["running","done","error"]}},"required":["status"],"additionalProperties":true}}},"required":["messages"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a conversation","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assistant/messages":{"post":{"summary":"Ask the assistant (answer runs in the background; poll the message)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","maxLength":64,"nullable":true},"message":{"type":"string","minLength":1,"maxLength":4000},"page":{"type":"string","maxLength":200,"nullable":true},"attach":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":5}},"required":["message"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/assistant/messages/{id}":{"get":{"summary":"One assistant message (poll while running)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["running","done","error"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assistant/messages/{id}/save":{"post":{"summary":"Save (or unsave) an answer to Saved outputs","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean"},"title":{"type":"string","maxLength":255,"nullable":true}},"required":["saved"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["running","done","error"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/assistant/saved":{"get":{"summary":"Saved outputs","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/grading":{"get":{"summary":"My grading sets","tags":["Teacher Command Center"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Start a grading set with a rubric","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"prompt":{"type":"string","maxLength":4000,"nullable":true},"rubric":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"levels":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":100},"descriptor":{"type":"string","minLength":1,"maxLength":1000}},"required":["score","descriptor"],"additionalProperties":false},"minItems":1,"maxItems":6}},"required":["name","levels"],"additionalProperties":false},"minItems":1,"maxItems":10}},"required":["criteria"],"additionalProperties":false},"maxScore":{"type":"integer","minimum":1,"maximum":1000},"sectionId":{"type":"string","maxLength":64,"nullable":true},"assessmentId":{"type":"string","maxLength":64,"nullable":true},"assignmentId":{"type":"string","maxLength":64,"nullable":true}},"required":["title","rubric"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/grading/{id}":{"get":{"summary":"A grading set with responses, AI suggestions and teacher decisions","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit the set or its rubric","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"prompt":{"type":"string","maxLength":4000,"nullable":true},"rubric":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"levels":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":100},"descriptor":{"type":"string","minLength":1,"maxLength":1000}},"required":["score","descriptor"],"additionalProperties":false},"minItems":1,"maxItems":6}},"required":["name","levels"],"additionalProperties":false},"minItems":1,"maxItems":10}},"required":["criteria"],"additionalProperties":false},"status":{"type":"string","enum":["open","completed","archived"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a grading set","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/grading/{id}/items":{"post":{"summary":"Add student responses","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"responseText":{"type":"string","minLength":1,"maxLength":20000},"studentPersonId":{"type":"string","maxLength":64,"nullable":true}},"required":["responseText"],"additionalProperties":false},"minItems":1,"maxItems":60}},"required":["items"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/grading/{id}/items/{itemId}":{"delete":{"summary":"Remove a response","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/grading/{id}/suggest":{"post":{"summary":"Ask the AI for rubric-score suggestions and feedback drafts (the teacher decides)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":40}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/grading/{id}/items/{itemId}/review":{"post":{"summary":"The teacher’s final score and feedback","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"finalScore":{"type":"number","minimum":0,"maximum":1000},"finalFeedback":{"type":"string","maxLength":4000,"nullable":true}},"required":["finalScore"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","suggested","reviewed"]}},"required":["status"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/grading/{id}/export":{"get":{"summary":"Final scores as CSV (to enter in the gradebook)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/insights/{id}":{"get":{"summary":"Trends for one of my classes and the latest AI recommendations","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/insights/{id}/recommend":{"post":{"summary":"Ask for instructional recommendations (aggregate data only; background job)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/interventions":{"get":{"summary":"My support plans","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"studentPersonId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Create a support plan for a student in my class","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","maxLength":64},"sectionId":{"type":"string","maxLength":64,"nullable":true},"area":{"type":"string","enum":["reading","math","writing","language","attendance","engagement","other"]},"tier":{"type":"integer","minimum":1,"maximum":3},"goal":{"type":"string","minLength":3,"maxLength":4000},"baseline":{"type":"string","maxLength":255,"nullable":true},"target":{"type":"string","maxLength":255,"nullable":true},"baselineValue":{"type":"number","nullable":true},"targetValue":{"type":"number","nullable":true},"measure":{"type":"string","maxLength":120,"nullable":true},"strategy":{"type":"string","minLength":3,"maxLength":4000},"frequency":{"type":"string","maxLength":120,"nullable":true},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"reviewDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["studentPersonId","area","goal","strategy","startDate"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/interventions/{id}":{"get":{"summary":"A support plan with progress monitoring","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit, close or reopen a plan","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentPersonId":{"type":"string","maxLength":64},"sectionId":{"type":"string","maxLength":64,"nullable":true},"area":{"type":"string","enum":["reading","math","writing","language","attendance","engagement","other"]},"tier":{"type":"integer","minimum":1,"maximum":3},"goal":{"type":"string","minLength":3,"maxLength":4000},"baseline":{"type":"string","maxLength":255,"nullable":true},"target":{"type":"string","maxLength":255,"nullable":true},"baselineValue":{"type":"number","nullable":true},"targetValue":{"type":"number","nullable":true},"measure":{"type":"string","maxLength":120,"nullable":true},"strategy":{"type":"string","minLength":3,"maxLength":4000},"frequency":{"type":"string","maxLength":120,"nullable":true},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"reviewDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"status":{"type":"string","enum":["active","met","discontinued","closed"]},"closingNote":{"type":"string","maxLength":4000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a plan","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/interventions/{id}/entries":{"post":{"summary":"Record progress","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"value":{"type":"number","nullable":true},"note":{"type":"string","maxLength":4000,"nullable":true}},"required":["date"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/interventions/{id}/entries/{entryId}":{"delete":{"summary":"Remove a progress entry","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"entryId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","met","discontinued","closed"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/parents/templates":{"get":{"summary":"Message templates (mine, school, district)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Create a template","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"category":{"type":"string","enum":["general","progress","missing_work","attendance","celebration","event","conference","reminder"]},"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","minLength":1,"maxLength":12000},"language":{"type":"string","maxLength":10},"scope":{"type":"string","enum":["private","school","district"]}},"required":["name","category","subject","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/templates/{id}":{"put":{"summary":"Edit a template","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"category":{"type":"string","enum":["general","progress","missing_work","attendance","celebration","event","conference","reminder"]},"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","minLength":1,"maxLength":12000},"language":{"type":"string","maxLength":10},"scope":{"type":"string","enum":["private","school","district"]}},"required":["name","category","subject","body"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Delete a template","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/messages":{"get":{"summary":"My parent messages","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true}}},"required":["rows"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Write a parent message (draft)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","maxLength":12000},"sectionId":{"type":"string","maxLength":64,"nullable":true},"audience":{"type":"string","enum":["section","students"]},"studentPersonIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"templateId":{"type":"string","maxLength":64,"nullable":true},"language":{"type":"string","maxLength":10}},"required":["subject","body"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/parents/messages/draft":{"post":{"summary":"Draft a parent message with AI (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","minLength":3,"maxLength":1000},"category":{"type":"string","enum":["general","progress","missing_work","attendance","celebration","event","conference","reminder"]},"sectionId":{"type":"string","maxLength":64,"nullable":true},"tone":{"type":"string","maxLength":60,"nullable":true},"facts":{"type":"string","maxLength":2000,"nullable":true}},"required":["purpose","category"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}":{"get":{"summary":"A parent message with translations and approval","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit a draft","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","maxLength":12000},"sectionId":{"type":"string","maxLength":64,"nullable":true},"audience":{"type":"string","enum":["section","students"]},"studentPersonIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"templateId":{"type":"string","maxLength":64,"nullable":true},"language":{"type":"string","maxLength":10}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a draft","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/recipients":{"get":{"summary":"Who will receive it (counts and home languages)","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/translate":{"post":{"summary":"Translate with AI (background job)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","enum":["en","es","pt","ht","ar","zh","ko","hi","gu","pl","ur","vi","fr","ru","tl"]}},"required":["language"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/translations/{language}":{"put":{"summary":"Edit (or remove) a translation","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":500},"body":{"type":"string","maxLength":12000}},"required":["subject","body"],"additionalProperties":false,"nullable":true}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["en","es","pt","ht","ar","zh","ko","hi","gu","pl","ur","vi","fr","ru","tl"]},"in":"path","name":"language","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/submit":{"post":{"summary":"Submit for approval (or approve directly when the district does not require it)","tags":["Teacher Command Center"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/withdraw":{"post":{"summary":"Withdraw from approval","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/parents/messages/{id}/send":{"post":{"summary":"Send an approved message through DEP messaging","tags":["Teacher Command Center"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","approved","sent","rejected"]}},"required":["status"],"additionalProperties":true},"meta":{}},"required":["data"],"additionalProperties":false}}}}}}},"/tcc/integrations":{"get":{"summary":"My classroom-system connections and what the district has set up","tags":["Teacher Command Center — integrations"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/{provider}/connect":{"post":{"summary":"Start connecting my account (returns the provider sign-in URL)","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnPath":{"type":"string","maxLength":255}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/oauth/{provider}/callback":{"get":{"summary":"OAuth callback (redirects back into the Teacher Command Center)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":4000},"in":"query","name":"code","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"state","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"error","required":false},{"schema":{"type":"string","maxLength":1000},"in":"query","name":"error_description","required":false},{"schema":{"type":"string","maxLength":500},"in":"query","name":"oauth_token","required":false},{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/tcc/integrations/{provider}":{"delete":{"summary":"Disconnect my account (revokes the sign-in where the provider allows it)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/{provider}/courses":{"get":{"summary":"My courses / class teams / sections there, with suggested links to my DEP classes","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/google/topics":{"get":{"summary":"Topics of one Google Classroom class","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":191},"in":"query","name":"courseId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/mappings":{"get":{"summary":"My class links","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"query","name":"provider","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Link one of my DEP classes to a course there (teacher confirms)","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"sectionId":{"type":"string","maxLength":64},"externalCourseId":{"type":"string","maxLength":191}},"required":["provider","sectionId","externalCourseId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/mappings/{id}":{"delete":{"summary":"Remove a class link","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/post":{"post":{"summary":"Post a lesson / assignment / assessment to linked classes (draft or published)","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"itemType":{"type":"string","enum":["lesson","assignment","assessment"]},"itemId":{"type":"string","maxLength":64},"sectionIds":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":12},"kind":{"type":"string","enum":["assignment","material","page","document"]},"attach":{"type":"string","enum":["pdf","docx","gdoc","text"]},"variantLevel":{"type":"string","maxLength":20,"nullable":true},"title":{"type":"string","maxLength":255,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"dueDate":{"type":"string","maxLength":10,"nullable":true},"dueTime":{"type":"string","maxLength":5,"nullable":true},"points":{"type":"integer","minimum":1,"maximum":1000,"nullable":true},"topic":{"type":"string","maxLength":100,"nullable":true},"studentCopy":{"type":"boolean"},"publish":{"type":"boolean"}},"required":["provider","itemType","itemId","sectionIds","kind","attach","publish"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/posts":{"get":{"summary":"What I posted (by item, class or date range)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["lesson","assignment","assessment"]},"in":"query","name":"itemType","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"itemId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"sectionId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"to","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"provider","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200},"in":"query","name":"take","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/posts/{id}":{"delete":{"summary":"Forget a post record (does not delete it in the provider)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/posts/{id}/results/pull":{"post":{"summary":"Bring in Google Classroom submission states / scores as suggestions","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/posts/{id}/results":{"get":{"summary":"Classroom results pulled for one post (suggestions only)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/onedrive/save":{"post":{"summary":"Save an export to my OneDrive folder \"Omni Forge DEP\"","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemType":{"type":"string","enum":["lesson","assignment","assessment"]},"itemId":{"type":"string","maxLength":64},"format":{"type":"string","enum":["pdf","docx"]},"variantLevel":{"type":"string","maxLength":20,"nullable":true},"part":{"type":"string","enum":["student","key","both"]},"withKey":{"type":"boolean"}},"required":["itemType","itemId","format"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/{provider}/files":{"get":{"summary":"Browse my Google Drive / OneDrive","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":300},"in":"query","name":"folder","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"next","required":false},{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/{provider}/import":{"post":{"summary":"Import a copy into my Resource Library (or a new version of an item I imported)","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","maxLength":300},"as":{"type":"string","enum":["pdf","docx"]},"resourceId":{"type":"string","maxLength":64,"nullable":true},"title":{"type":"string","maxLength":255,"nullable":true}},"required":["fileId"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/imports/{id}":{"get":{"summary":"Where a library item was imported from","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/admin":{"get":{"summary":"Provider setup for the district (district administrators)","tags":["Teacher Command Center — integrations"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/admin/{provider}":{"put":{"summary":"Save a provider: switch, credentials (write-only), site, tenant, features","tags":["Teacher Command Center — integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"clientId":{"type":"string","maxLength":300,"nullable":true},"clientSecret":{"type":"string","maxLength":500,"nullable":true},"baseUrl":{"type":"string","maxLength":255,"nullable":true},"tenant":{"type":"string","maxLength":100,"nullable":true},"features":{"type":"object","additionalProperties":{"type":"boolean"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Remove the district credentials (switches it off and disconnects every teacher)","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/tcc/integrations/admin/{provider}/check":{"post":{"summary":"Health check of the provider credentials","tags":["Teacher Command Center — integrations"],"parameters":[{"schema":{"type":"string","enum":["google","microsoft","canvas","schoology"]},"in":"path","name":"provider","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/me":{"get":{"summary":"Who I am in Document Signing (menu, counts)","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/options":{"get":{"summary":"Choices for filters and forms","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/dashboard":{"get":{"summary":"Dashboard: awaiting me, waiting on others, completed, overdue, activity","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/inbox":{"get":{"summary":"Documents addressed to me","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","enum":["waiting","done","all"],"default":"waiting"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/inbox/{id}/open":{"post":{"summary":"My signing link in YRCDoc","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/notifications":{"get":{"summary":"My Document Signing notices","tags":["Document Signing"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"unread","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/notifications/read":{"post":{"summary":"Mark notices read","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":200},"all":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes":{"get":{"summary":"Documents (filters: status, sender, school, template, department, dates, due, search)","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","maxLength":20},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["mine","all"]},"in":"query","name":"scope","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"senderUserId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"schoolId","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"templateId","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"department","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":false},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":false},{"schema":{"type":"string","enum":["overdue","soon"]},"in":"query","name":"due","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Create a document for signature (and send it)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","maxLength":255,"nullable":true},"message":{"type":"string","maxLength":5000,"nullable":true},"fileKey":{"type":"string","minLength":1,"maxLength":400},"fileName":{"type":"string","maxLength":255,"nullable":true},"sourceType":{"type":"string","enum":["upload","hr_document","construction_document","building_document","report"],"nullable":true},"sourceId":{"type":"string","maxLength":191,"nullable":true},"recipients":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","maxLength":255,"nullable":true},"email":{"type":"string","maxLength":255,"nullable":true},"role":{"type":"string","enum":["signer","approver","viewer","cc"]},"order":{"type":"integer","minimum":1,"maximum":25,"nullable":true}},"required":["role"],"additionalProperties":false},"minItems":1,"maxItems":25},"signingOrder":{"type":"string","enum":["parallel","sequential"],"default":"parallel"},"fields":{"type":"array","items":{"type":"object","properties":{"recipient":{"type":"integer","minimum":0,"maximum":24},"type":{"type":"string","enum":["signature","initials","date","name","text","checkbox","email"]},"page":{"type":"integer","minimum":1,"maximum":60},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"w":{"type":"number","minimum":0.5,"maximum":100},"h":{"type":"number","minimum":0.5,"maximum":100},"label":{"type":"string","maxLength":100,"nullable":true}},"required":["recipient","type","page","x","y","w","h"],"additionalProperties":false},"maxItems":300},"dueAt":{"type":"string","maxLength":40,"nullable":true},"reminderEveryDays":{"type":"integer","minimum":0,"maximum":30,"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"department":{"type":"string","enum":["general","hr","special_ed","student_services","transportation","business","facilities","academics"],"nullable":true},"send":{"type":"boolean","default":true}},"required":["title","fileKey","recipients","fields"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}":{"get":{"summary":"One document: recipients, fields, timeline, actions","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"delete":{"summary":"Discard a draft","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/send":{"post":{"summary":"Send a draft","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/remind":{"post":{"summary":"Remind recipients who have not signed","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipientIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":25}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/void":{"post":{"summary":"Void a document in progress","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/refresh":{"post":{"summary":"Refresh status from YRCDoc now","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/recipients/{recipientId}/link":{"post":{"summary":"A signing link to hand to a recipient (sender only)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fresh":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":64},"in":"path","name":"recipientId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/audit":{"get":{"summary":"YRCDoc audit trail for the document","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/envelopes/{id}/download/{kind}":{"get":{"summary":"Download the original, the signed PDF, the certificate or the audit log","tags":["Document Signing"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"inline","required":false},{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["original","signed","certificate","audit"]},"in":"path","name":"kind","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/esign/envelopes/{id}/pages/{page}":{"get":{"summary":"One page of the document as an image (field preview)","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"integer","minimum":1,"maximum":60},"in":"path","name":"page","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/esign/uploads":{"post":{"summary":"Upload a PDF to send or to make a template (multipart, field \"file\")","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/files/info":{"get":{"summary":"Pages of an uploaded or template PDF","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":400},"in":"query","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/files/page":{"get":{"summary":"One page of an uploaded or template PDF as an image","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":400},"in":"query","name":"key","required":true},{"schema":{"type":"integer","minimum":1,"maximum":60},"in":"query","name":"page","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/esign/files/pdf":{"get":{"summary":"An uploaded or template PDF","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":400},"in":"query","name":"key","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/esign/people":{"get":{"summary":"Find staff, guardians and students 18+","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":true},{"schema":{"type":"string","enum":["staff","guardian","student"]},"in":"query","name":"kind","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/groups":{"get":{"summary":"Groups I can bulk-send to","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/groups/members":{"get":{"summary":"Who is in a group","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","enum":["section_guardians","school_staff","school_guardians","grade_guardians","field_trip_guardians"]},"in":"query","name":"type","required":true},{"schema":{"type":"string","maxLength":120},"in":"query","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates":{"get":{"summary":"Templates","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"category","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false},{"schema":{"type":"boolean"},"in":"query","name":"archived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"post":{"summary":"Create a template (uploaded PDF, or text DEP turns into a PDF)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000,"nullable":true},"category":{"type":"string","enum":["staff_contract","permission_slip","iep_consent","section_504_consent","ferpa_release","vendor_agreement","onboarding","board_resolution","policy_acknowledgement","other"]},"department":{"type":"string","enum":["general","hr","special_ed","student_services","transportation","business","facilities","academics"],"nullable":true},"audience":{"type":"string","enum":["staff","guardians","students","external","mixed"],"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","enum":["signer","approver","viewer","cc"]},"order":{"type":"integer","minimum":1,"maximum":10},"kind":{"type":"string","enum":["staff","guardian","student","external","any"],"default":"any"}},"required":["key","label","role","order"],"additionalProperties":false},"minItems":1,"maxItems":10},"fields":{"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","maxLength":30},"type":{"type":"string","enum":["signature","initials","date","name","text","checkbox","email"]},"page":{"type":"integer","minimum":1,"maximum":60},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"w":{"type":"number","minimum":0.5,"maximum":100},"h":{"type":"number","minimum":0.5,"maximum":100},"label":{"type":"string","maxLength":100,"nullable":true}},"required":["roleKey","type","page","x","y","w","h"],"additionalProperties":false},"maxItems":300},"fileKey":{"type":"string","maxLength":400,"nullable":true},"fileName":{"type":"string","maxLength":255,"nullable":true},"bodyText":{"type":"string","maxLength":20000,"nullable":true},"subject":{"type":"string","maxLength":255,"nullable":true},"message":{"type":"string","maxLength":5000,"nullable":true},"dueDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true}},"required":["name","category","roles","fields"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates/{id}":{"get":{"summary":"One template","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"patch":{"summary":"Edit a template","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000,"nullable":true},"category":{"type":"string","enum":["staff_contract","permission_slip","iep_consent","section_504_consent","ferpa_release","vendor_agreement","onboarding","board_resolution","policy_acknowledgement","other"]},"department":{"type":"string","enum":["general","hr","special_ed","student_services","transportation","business","facilities","academics"],"nullable":true},"audience":{"type":"string","enum":["staff","guardians","students","external","mixed"],"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"roles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","enum":["signer","approver","viewer","cc"]},"order":{"type":"integer","minimum":1,"maximum":10},"kind":{"type":"string","enum":["staff","guardian","student","external","any"],"default":"any"}},"required":["key","label","role","order"],"additionalProperties":false},"minItems":1,"maxItems":10},"fields":{"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","maxLength":30},"type":{"type":"string","enum":["signature","initials","date","name","text","checkbox","email"]},"page":{"type":"integer","minimum":1,"maximum":60},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"w":{"type":"number","minimum":0.5,"maximum":100},"h":{"type":"number","minimum":0.5,"maximum":100},"label":{"type":"string","maxLength":100,"nullable":true}},"required":["roleKey","type","page","x","y","w","h"],"additionalProperties":false},"maxItems":300},"fileKey":{"type":"string","maxLength":400,"nullable":true},"fileName":{"type":"string","maxLength":255,"nullable":true},"bodyText":{"type":"string","maxLength":20000,"nullable":true},"subject":{"type":"string","maxLength":255,"nullable":true},"message":{"type":"string","maxLength":5000,"nullable":true},"dueDays":{"type":"integer","minimum":1,"maximum":365,"nullable":true}},"required":["name","category","roles","fields"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates/{id}/archive":{"post":{"summary":"Archive a template","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates/{id}/restore":{"post":{"summary":"Restore an archived template","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates/{id}/use":{"post":{"summary":"Send a document from a template","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipients":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","maxLength":255,"nullable":true},"email":{"type":"string","maxLength":255,"nullable":true},"role":{"type":"string","enum":["signer","approver","viewer","cc"],"default":"signer"},"order":{"type":"integer","minimum":1,"maximum":25,"nullable":true},"roleKey":{"type":"string","maxLength":30}},"required":["roleKey"],"additionalProperties":false},"minItems":1,"maxItems":10},"title":{"type":"string","maxLength":255,"nullable":true},"subject":{"type":"string","maxLength":255,"nullable":true},"message":{"type":"string","maxLength":5000,"nullable":true},"dueAt":{"type":"string","maxLength":40,"nullable":true},"schoolId":{"type":"string","maxLength":64,"nullable":true},"merge":{"type":"object","additionalProperties":{"type":"string","maxLength":200},"nullable":true},"sourceType":{"type":"string","enum":["template","field_trip","iep","section_504","hr_document"],"nullable":true},"sourceId":{"type":"string","maxLength":191,"nullable":true},"send":{"type":"boolean","default":true}},"required":["recipients"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/templates/{id}/bulk":{"post":{"summary":"Send a template to a group (one document each, names merged)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"groupType":{"type":"string","enum":["section_guardians","school_staff","school_guardians","grade_guardians","field_trip_guardians"]},"groupId":{"type":"string","maxLength":120},"roleKey":{"type":"string","maxLength":30},"others":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","maxLength":64,"nullable":true},"name":{"type":"string","maxLength":255,"nullable":true},"email":{"type":"string","maxLength":255,"nullable":true},"role":{"type":"string","enum":["signer","approver","viewer","cc"],"default":"signer"},"order":{"type":"integer","minimum":1,"maximum":25,"nullable":true},"roleKey":{"type":"string","maxLength":30}},"required":["roleKey"],"additionalProperties":false},"maxItems":5},"dueAt":{"type":"string","maxLength":40,"nullable":true},"message":{"type":"string","maxLength":5000,"nullable":true}},"required":["groupType","groupId","roleKey"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/bulk-sends":{"get":{"summary":"Bulk sends","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/settings":{"get":{"summary":"District settings and YRCDoc connection health","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}},"put":{"summary":"Change district settings (district administrator)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"senderRoles":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":40},"typedSignature":{"type":"boolean"},"drawnSignature":{"type":"boolean"},"uploadSignature":{"type":"boolean"},"defaultDueDays":{"type":"integer","minimum":1,"maximum":365},"reminderEveryDays":{"type":"integer","minimum":0,"maximum":30},"maxReminders":{"type":"integer","minimum":0,"maximum":10},"retentionYears":{"type":"integer","minimum":1,"maximum":50},"brandingName":{"type":"string","maxLength":120,"nullable":true},"brandingColor":{"type":"string","maxLength":9,"nullable":true},"timezone":{"type":"string","maxLength":60},"dateFormat":{"type":"string","maxLength":20}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/settings/check":{"post":{"summary":"Check the YRCDoc connection now","tags":["Document Signing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/reports":{"get":{"summary":"Turnaround, completion rate, by school, department, template and sender","tags":["Document Signing"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":730,"default":90},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/reports/rows":{"get":{"summary":"Every document sent in the period (CSV export)","tags":["Document Signing"],"parameters":[{"schema":{"type":"integer","minimum":7,"maximum":730,"default":90},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/sources/import":{"post":{"summary":"Use a PDF already in DEP (personnel file, project or building document)","tags":["Document Signing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["hr_document","construction_document","building_document"]},"id":{"type":"string","maxLength":64}},"required":["type","id"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/sources/context":{"get":{"summary":"Template and signers for a field trip, IEP or 504 plan","tags":["Document Signing"],"parameters":[{"schema":{"type":"string","enum":["field_trip","iep","section_504"]},"in":"query","name":"type","required":true},{"schema":{"type":"string","maxLength":64},"in":"query","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}},"additionalProperties":false}}}}}}},"/esign/webhooks/yrcdoc":{"post":{"summary":"YRCDoc webhook (document sent, opened, signed, completed, rejected, cancelled) — shared-secret, public","tags":["Webhooks"],"requestBody":{"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"handled":{"type":"string"},"error":{"type":"string"}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"handled":{"type":"string"},"error":{"type":"string"}},"required":["ok"],"additionalProperties":false}}}}}}},"/websites/templates":{"get":{"summary":"List available website templates","tags":["Websites"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"previewImageUrl":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"config":{"type":"object","additionalProperties":{}}},"required":["id","name","description","previewImageUrl","isActive","config"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites":{"get":{"summary":"List sites for this district","tags":["Websites"],"parameters":[{"schema":{"type":"string","enum":["DISTRICT","SCHOOL"]},"in":"query","name":"type","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"name":{"type":"string"},"slug":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"previewSlug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","type","name","slug","templateId","status","previewSlug","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a site","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"schoolId":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"}},"required":["type","name","slug"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"name":{"type":"string"},"slug":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"previewSlug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","type","name","slug","templateId","status","previewSlug","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}":{"get":{"summary":"Get a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"name":{"type":"string"},"slug":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"previewSlug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","type","name","slug","templateId","status","previewSlug","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a site","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"templateId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"schoolId":{"type":"string","nullable":true},"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"name":{"type":"string"},"slug":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"previewSlug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","districtId","schoolId","type","name","slug","templateId","status","previewSlug","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Archive (soft-delete) a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/pages":{"get":{"summary":"List pages for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"parentId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"parentId":{"type":"string","nullable":true},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"publishedAt":{"type":"string","format":"date-time","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"metaTitle":{"type":"string","nullable":true},"metaDescription":{"type":"string","nullable":true},"position":{"type":"integer"},"inNav":{"type":"boolean"},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","parentId","title","slug","status","publishedAt","scheduledAt","metaTitle","metaDescription","position","inNav","isLocked","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a page","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9-]+$"},"parentId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"],"default":"DRAFT"},"scheduledAt":{"type":"string","format":"date-time"},"metaTitle":{"type":"string","maxLength":200},"metaDescription":{"type":"string","maxLength":500},"position":{"type":"integer","minimum":0,"default":0},"inNav":{"type":"boolean","default":true}},"required":["title","slug"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"parentId":{"type":"string","nullable":true},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"publishedAt":{"type":"string","format":"date-time","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"metaTitle":{"type":"string","nullable":true},"metaDescription":{"type":"string","nullable":true},"position":{"type":"integer"},"inNav":{"type":"boolean"},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","pageId","type","position","config","isLocked","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","siteId","parentId","title","slug","status","publishedAt","scheduledAt","metaTitle","metaDescription","position","inNav","isLocked","createdAt","updatedAt","blocks"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/pages/{pageId}":{"get":{"summary":"Get a page with its blocks","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"parentId":{"type":"string","nullable":true},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"publishedAt":{"type":"string","format":"date-time","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"metaTitle":{"type":"string","nullable":true},"metaDescription":{"type":"string","nullable":true},"position":{"type":"integer"},"inNav":{"type":"boolean"},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","pageId","type","position","config","isLocked","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","siteId","parentId","title","slug","status","publishedAt","scheduledAt","metaTitle","metaDescription","position","inNav","isLocked","createdAt","updatedAt","blocks"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a page","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9-]+$"},"parentId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"metaTitle":{"type":"string","maxLength":200,"nullable":true},"metaDescription":{"type":"string","maxLength":500,"nullable":true},"position":{"type":"integer","minimum":0},"inNav":{"type":"boolean"},"isLocked":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"parentId":{"type":"string","nullable":true},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","SCHEDULED","ARCHIVED"]},"publishedAt":{"type":"string","format":"date-time","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"metaTitle":{"type":"string","nullable":true},"metaDescription":{"type":"string","nullable":true},"position":{"type":"integer"},"inNav":{"type":"boolean"},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","pageId","type","position","config","isLocked","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","siteId","parentId","title","slug","status","publishedAt","scheduledAt","metaTitle","metaDescription","position","inNav","isLocked","createdAt","updatedAt","blocks"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a page","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/pages/{pageId}/blocks":{"post":{"summary":"Add a block to a page","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":50},"position":{"type":"integer","minimum":0,"default":0},"config":{"type":"object","additionalProperties":{},"default":{}}},"required":["type"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","pageId","type","position","config","isLocked","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/pages/{pageId}/blocks/{blockId}":{"patch":{"summary":"Update a block","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"position":{"type":"integer","minimum":0},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"blockId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}},"isLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","pageId","type","position","config","isLocked","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a block","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"blockId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/pages/{pageId}/blocks/reorder":{"post":{"summary":"Reorder blocks on a page","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["order"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"pageId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/branding":{"get":{"summary":"Get branding for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"logoUrl":{"type":"string","nullable":true},"faviconUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string","nullable":true},"secondaryColor":{"type":"string","nullable":true},"accentColor":{"type":"string","nullable":true},"fontPairing":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","logoUrl","faviconUrl","primaryColor","secondaryColor","accentColor","fontPairing","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"put":{"summary":"Upsert branding for a site","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"faviconUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","nullable":true},"secondaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","nullable":true},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","nullable":true},"fontPairing":{"type":"string","maxLength":100,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"logoUrl":{"type":"string","nullable":true},"faviconUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string","nullable":true},"secondaryColor":{"type":"string","nullable":true},"accentColor":{"type":"string","nullable":true},"fontPairing":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","logoUrl","faviconUrl","primaryColor","secondaryColor","accentColor","fontPairing","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/domains":{"get":{"summary":"List domains for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"domain":{"type":"string"},"isPrimary":{"type":"boolean"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"sslStatus":{"type":"string","enum":["PENDING","ACTIVE","EXPIRING","FAILED"]},"verifiedAt":{"type":"string","format":"date-time","nullable":true},"sslIssuedAt":{"type":"string","format":"date-time","nullable":true},"sslExpiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","domain","isPrimary","status","sslStatus","verifiedAt","sslIssuedAt","sslExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add a custom domain","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253},"isPrimary":{"type":"boolean","default":false}},"required":["domain"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"domain":{"type":"string"},"isPrimary":{"type":"boolean"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"sslStatus":{"type":"string","enum":["PENDING","ACTIVE","EXPIRING","FAILED"]},"verifiedAt":{"type":"string","format":"date-time","nullable":true},"sslIssuedAt":{"type":"string","format":"date-time","nullable":true},"sslExpiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","domain","isPrimary","status","sslStatus","verifiedAt","sslIssuedAt","sslExpiresAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/domains/{domainId}/verify":{"post":{"summary":"Trigger domain verification","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"domainId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"domain":{"type":"string"},"isPrimary":{"type":"boolean"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"sslStatus":{"type":"string","enum":["PENDING","ACTIVE","EXPIRING","FAILED"]},"verifiedAt":{"type":"string","format":"date-time","nullable":true},"sslIssuedAt":{"type":"string","format":"date-time","nullable":true},"sslExpiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","domain","isPrimary","status","sslStatus","verifiedAt","sslIssuedAt","sslExpiresAt","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/domains/{domainId}":{"delete":{"summary":"Remove a domain","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"domainId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/redirects":{"get":{"summary":"List redirects for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","enum":["MANUAL","CRAWL_HIGH","CRAWL_MEDIUM","CRAWL_LOW"]},"in":"query","name":"source","required":false},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"type":{"type":"string","enum":["PERMANENT","TEMPORARY"]},"isWildcard":{"type":"boolean"},"source":{"type":"string","enum":["MANUAL","CRAWL_HIGH","CRAWL_MEDIUM","CRAWL_LOW"]},"confidence":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","fromPath","toPath","type","isWildcard","source","confidence","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a redirect","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fromPath":{"type":"string","minLength":1,"maxLength":500},"toPath":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["PERMANENT","TEMPORARY"],"default":"PERMANENT"},"isWildcard":{"type":"boolean","default":false}},"required":["fromPath","toPath"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"type":{"type":"string","enum":["PERMANENT","TEMPORARY"]},"isWildcard":{"type":"boolean"},"source":{"type":"string","enum":["MANUAL","CRAWL_HIGH","CRAWL_MEDIUM","CRAWL_LOW"]},"confidence":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","fromPath","toPath","type","isWildcard","source","confidence","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/redirects/{redirectId}":{"patch":{"summary":"Update a redirect","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toPath":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["PERMANENT","TEMPORARY"]},"isWildcard":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"redirectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"fromPath":{"type":"string"},"toPath":{"type":"string"},"type":{"type":"string","enum":["PERMANENT","TEMPORARY"]},"isWildcard":{"type":"boolean"},"source":{"type":"string","enum":["MANUAL","CRAWL_HIGH","CRAWL_MEDIUM","CRAWL_LOW"]},"confidence":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","fromPath","toPath","type","isWildcard","source","confidence","createdAt","updatedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a redirect","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"redirectId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/redirects/bulk-approve":{"post":{"summary":"Bulk approve crawl-suggested redirects","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500}},"required":["ids"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"approved":{"type":"integer"}},"required":["approved"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/media":{"get":{"summary":"List media assets for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","enum":["IMAGE","DOCUMENT","VIDEO_LINK"]},"in":"query","name":"type","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"filename":{"type":"string"},"url":{"type":"string"},"cdnUrl":{"type":"string","nullable":true},"type":{"type":"string","enum":["IMAGE","DOCUMENT","VIDEO_LINK"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"altText":{"type":"string","nullable":true},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true},"uploadedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","siteId","filename","url","cdnUrl","type","mimeType","sizeBytes","altText","width","height","uploadedBy","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Register an uploaded media asset","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","format":"uri","maxLength":500},"cdnUrl":{"type":"string","format":"uri","maxLength":500},"type":{"type":"string","enum":["IMAGE","DOCUMENT","VIDEO_LINK"]},"mimeType":{"type":"string","minLength":1,"maxLength":100},"sizeBytes":{"type":"integer","minimum":1},"altText":{"type":"string","maxLength":500},"width":{"type":"integer"},"height":{"type":"integer"},"spacesKey":{"type":"string","minLength":1,"maxLength":500}},"required":["filename","url","type","mimeType","sizeBytes","spacesKey"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"filename":{"type":"string"},"url":{"type":"string"},"cdnUrl":{"type":"string","nullable":true},"type":{"type":"string","enum":["IMAGE","DOCUMENT","VIDEO_LINK"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"altText":{"type":"string","nullable":true},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true},"uploadedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","siteId","filename","url","cdnUrl","type","mimeType","sizeBytes","altText","width","height","uploadedBy","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/media/{assetId}":{"delete":{"summary":"Soft-delete a media asset","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/crawl":{"get":{"summary":"List crawl jobs for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"sourceUrl":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"itemCount":{"type":"integer"},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","siteId","sourceUrl","status","startedAt","completedAt","itemCount","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Start a site crawl job","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceUrl":{"type":"string","format":"uri","maxLength":500}},"required":["sourceUrl"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"sourceUrl":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"itemCount":{"type":"integer"},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"inventoryJson":{"type":"object","additionalProperties":{},"nullable":true},"gapReportJson":{"type":"object","additionalProperties":{},"nullable":true},"matchesJson":{"type":"object","additionalProperties":{},"nullable":true}},"required":["id","siteId","sourceUrl","status","startedAt","completedAt","itemCount","errorMessage","createdAt","updatedAt","inventoryJson","gapReportJson","matchesJson"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/crawl/{jobId}":{"get":{"summary":"Get crawl job with results","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"jobId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"sourceUrl":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"itemCount":{"type":"integer"},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"inventoryJson":{"type":"object","additionalProperties":{},"nullable":true},"gapReportJson":{"type":"object","additionalProperties":{},"nullable":true},"matchesJson":{"type":"object","additionalProperties":{},"nullable":true}},"required":["id","siteId","sourceUrl","status","startedAt","completedAt","itemCount","errorMessage","createdAt","updatedAt","inventoryJson","gapReportJson","matchesJson"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/permissions":{"get":{"summary":"List editor permissions for a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"personId":{"type":"string"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","siteId","personId","role","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Add an editor to a site","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"]}},"required":["personId","role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"personId":{"type":"string"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","siteId","personId","role","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/sites/{siteId}/permissions/{permId}":{"patch":{"summary":"Update editor role","tags":["Websites"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"]}},"required":["role"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"permId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"personId":{"type":"string"},"role":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","siteId","personId","role","createdAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove an editor from a site","tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"permId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/websites/preview/{previewSlug}":{"get":{"summary":"Get site layout (public)","tags":["Websites – Preview"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"previewSlug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["DISTRICT","SCHOOL"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]}},"required":["id","name","type","status"],"additionalProperties":false},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"faviconUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string","nullable":true},"secondaryColor":{"type":"string","nullable":true},"accentColor":{"type":"string","nullable":true},"fontPairing":{"type":"string","nullable":true}},"required":["logoUrl","faviconUrl","primaryColor","secondaryColor","accentColor","fontPairing"],"additionalProperties":false,"nullable":true},"navPages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"parentId":{"type":"string","nullable":true},"position":{"type":"integer"}},"required":["id","title","slug","parentId","position"],"additionalProperties":false}}},"required":["site","branding","navPages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/websites/preview/{previewSlug}/page":{"get":{"summary":"Get a page with blocks (public)","tags":["Websites – Preview"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"slug","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"previewSlug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"metaTitle":{"type":"string","nullable":true},"metaDescription":{"type":"string","nullable":true},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"position":{"type":"integer"},"config":{"type":"object","additionalProperties":{}}},"required":["id","type","position","config"],"additionalProperties":false}}},"required":["id","title","slug","metaTitle","metaDescription","blocks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/websites/preview/{previewSlug}/live-data":{"get":{"summary":"Get live district data for website blocks (public)","tags":["Websites – Preview"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"previewSlug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"district":{"type":"object","properties":{"name":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string"},"zipCode":{"type":"string"},"studentCount":{"type":"integer"},"staffCount":{"type":"integer"}},"required":["name","addressLine1","addressLine2","city","state","zipCode","studentCount","staffCount"],"additionalProperties":false,"nullable":true},"events":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"title":{"type":"string"},"dayType":{"type":"string"}},"required":["date","title","dayType"],"additionalProperties":false}},"news":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"sentAt":{"type":"string"}},"required":["id","subject","body","sentAt"],"additionalProperties":false}},"staff":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"photoUrl":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["id","firstName","lastName","photoUrl","email"],"additionalProperties":false}}},"required":["district","events","news","staff"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/websites/preview/{previewSlug}/sis-data":{"get":{"summary":"District data for the website blocks the SIS can fill (public)","tags":["Websites – Preview"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"previewSlug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"alert":{"type":"object","properties":{"date":{"type":"string"},"dayType":{"type":"string"},"headline":{"type":"string"},"detail":{"type":"string","nullable":true}},"required":["date","dayType","headline","detail"],"additionalProperties":false,"nullable":true},"menus":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"mealType":{"type":"string"},"menuGroup":{"type":"string"},"note":{"type":"string","nullable":true},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"}},"required":["name","category"],"additionalProperties":false}}},"required":["date","mealType","menuGroup","note","items"],"additionalProperties":false}},"boardMeetings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"meetingType":{"type":"string"},"scheduledAt":{"type":"string"},"location":{"type":"string","nullable":true},"status":{"type":"string"},"videoUrl":{"type":"string","nullable":true},"agenda":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"presenter":{"type":"string","nullable":true},"attachmentUrl":{"type":"string","nullable":true}},"required":["title","presenter","attachmentUrl"],"additionalProperties":false}},"minutesPublished":{"type":"boolean"}},"required":["id","title","meetingType","scheduledAt","location","status","videoUrl","agenda","minutesPublished"],"additionalProperties":false}},"activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"activityType":{"type":"string"},"season":{"type":"string","nullable":true},"coachName":{"type":"string","nullable":true},"schoolName":{"type":"string","nullable":true}},"required":["id","name","activityType","season","coachName","schoolName"],"additionalProperties":false}},"schools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"principal":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"hours":{"type":"string","nullable":true},"gradeRange":{"type":"string","nullable":true},"address":{"type":"string","nullable":true}},"required":["id","name","principal","phone","website","hours","gradeRange","address"],"additionalProperties":false}},"generatedAt":{"type":"string"}},"required":["alert","menus","boardMeetings","activities","schools","generatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/oneroster/outbound/export":{"get":{"summary":"Generate and download a OneRoster 1.2 CSV ZIP export","tags":["Integrations · OneRoster"],"description":"Generates a complete OneRoster 1.2 bulk export for the district and returns it as a ZIP file. Requires the district to be on Professional or Enterprise plan.","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"application/zip binary","content":{"application/json":{"schema":{"description":"application/zip binary"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/oneroster/outbound/status":{"get":{"summary":"Last OneRoster export metadata","tags":["Integrations · OneRoster"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lastExportAt":{"type":"string","nullable":true},"lastExportAsOf":{"type":"string","nullable":true},"lastExportRowCounts":{"type":"object","additionalProperties":{"type":"number"},"nullable":true},"pushEndpointConfigured":{"type":"boolean"},"lastPushAt":{"type":"string","nullable":true},"lastPushStatus":{"type":"string","nullable":true}},"required":["lastExportAt","lastExportAsOf","lastExportRowCounts","pushEndpointConfigured","lastPushAt","lastPushStatus"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/integrations/oneroster/outbound/sync":{"post":{"summary":"Push OneRoster export to configured endpoint","tags":["Integrations · OneRoster"],"description":"Generates a fresh OneRoster export and pushes it to the configured push endpoint. Configure the endpoint URL + bearer token in district settings.oneRoster.endpointUrl / .bearerToken.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"asOf":{"type":"string","format":"date"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"statusCode":{"type":"integer"},"rowCounts":{"type":"object","additionalProperties":{"type":"number"}},"pushedAt":{"type":"string"}},"required":["ok","statusCode","rowCounts","pushedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/oneroster/outbound/config":{"patch":{"summary":"Save the OneRoster outbound push endpoint config","tags":["Integrations · OneRoster"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endpointUrl":{"type":"string","format":"uri"},"bearerToken":{"type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/integrations/m365/config":{"get":{"summary":"Get M365 integration config for the district","tags":["Integrations · Microsoft 365"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenantId":{"type":"string"},"clientId":{"type":"string"},"syncEnabled":{"type":"boolean"},"lastSyncAt":{"type":"string","nullable":true},"configured":{"type":"boolean"}},"required":["tenantId","clientId","syncEnabled","lastSyncAt","configured"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"patch":{"summary":"Update M365 tenantId, clientId, or sync toggle","tags":["Integrations · Microsoft 365"],"description":"Update the M365 configuration. Client secret is NOT stored here — set it as an environment variable: ${DISTRICT_ID}__M365_CLIENT_SECRET.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":200},"clientId":{"type":"string","minLength":1,"maxLength":200},"syncEnabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["ok","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/m365/sync-users":{"post":{"summary":"Sync all active students and staff to M365","tags":["Integrations · Microsoft 365"],"description":"Provisions or updates all active STUDENT and STAFF persons in Azure AD. Respects the configured tenantId/clientId and reads M365_CLIENT_SECRET from env.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}},"completedAt":{"type":"string"}},"required":["created","updated","failed","errors","completedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/m365/sync-teams":{"post":{"summary":"Sync section roster as Teams class groups","tags":["Integrations · Microsoft 365"],"description":"Creates or updates Microsoft Teams Education class groups for each active section. Each section becomes a Teams class with the lead teacher as owner.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}},"completedAt":{"type":"string"}},"required":["created","updated","failed","errors","completedAt"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/integrations/m365/sync-status":{"get":{"summary":"Last M365 sync results","tags":["Integrations · Microsoft 365"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"lastSyncAt":{"type":"string","nullable":true},"lastSyncStats":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}},"completedAt":{"type":"string"}},"required":["created","updated","failed","errors","completedAt"],"additionalProperties":false,"nullable":true}},"required":["lastSyncAt","lastSyncStats"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/auth/login":{"post":{"summary":"Operator login (Super Admin Console)","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":200},"password":{"type":"string","minLength":1,"maxLength":200}},"required":["email","password"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"operator":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"displayName":{"type":"string"},"role":{"type":"string"}},"required":["id","email","displayName","role"],"additionalProperties":false,"nullable":true},"mfaRequired":{"type":"boolean"},"pendingMfaToken":{"type":"string"}},"required":["operator","mfaRequired"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/api/platform/v1/auth/mfa-verify":{"post":{"summary":"Complete operator login with a TOTP code","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pendingMfaToken":{"type":"string","minLength":10,"maxLength":128},"totpCode":{"type":"string","minLength":6,"maxLength":8}},"required":["pendingMfaToken","totpCode"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"operator":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"displayName":{"type":"string"},"role":{"type":"string"}},"required":["id","email","displayName","role"],"additionalProperties":false}},"required":["operator"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/api/platform/v1/auth/logout":{"post":{"summary":"Operator logout","tags":["Platform"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"loggedOut":{"type":"boolean","enum":[true]}},"required":["loggedOut"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/auth/session":{"get":{"summary":"Current operator session, if any","tags":["Platform"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"authenticated":{"type":"boolean"},"operator":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"displayName":{"type":"string"},"role":{"type":"string"}},"required":["id","email","displayName","role"],"additionalProperties":false,"nullable":true}},"required":["authenticated","operator"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/support/users":{"get":{"summary":"Search a district’s users to support","tags":["Platform"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":true},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/support/request":{"post":{"summary":"Request support access — emails a one-time code to the user","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"targetUserId":{"type":"string","format":"uuid"}},"required":["districtId","targetUserId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sentTo":{"type":"string"}},"required":["sentTo"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/api/platform/v1/support/verify":{"post":{"summary":"Verify the code and start an operator support session","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"targetUserId":{"type":"string","format":"uuid"},"code":{"type":"string","minLength":4,"maxLength":8}},"required":["districtId","targetUserId","code"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"actingAs":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","roles"],"additionalProperties":false},"districtSubdomain":{"type":"string","nullable":true}},"required":["actingAs","districtSubdomain"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{}},"additionalProperties":false}}}}}}},"/api/platform/v1/dashboard/summary":{"get":{"summary":"Super Admin: aggregate platform metrics","tags":["Platform"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"districts":{"type":"object","properties":{"total":{"type":"integer"},"active":{"type":"integer"},"trial":{"type":"integer"},"churned":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","active","trial","churned","byStatus"],"additionalProperties":false},"billing":{"type":"object","properties":{"mrr":{"type":"number"},"arr":{"type":"number"},"trialEndingSoon":{"type":"integer"}},"required":["mrr","arr","trialEndingSoon"],"additionalProperties":false},"usage":{"type":"object","properties":{"totalStudents":{"type":"integer"},"totalStaff":{"type":"integer"},"aiCallsLast24h":{"type":"integer"},"aiSpendLast24h":{"type":"number"},"eventsLastHour":{"type":"integer"}},"required":["totalStudents","totalStaff","aiCallsLast24h","aiSpendLast24h","eventsLastHour"],"additionalProperties":false},"people":{"type":"object","properties":{"totalUsers":{"type":"integer"},"totalGuardians":{"type":"integer"}},"required":["totalUsers","totalGuardians"],"additionalProperties":false}},"required":["districts","billing","usage","people"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts":{"get":{"summary":"Super Admin: list every district","tags":["Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"query","name":"state","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cdsCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"state":{"type":"string"},"city":{"type":"string"},"type":{"type":"string"},"subscriptionPlan":{"type":"string"},"subscriptionStatus":{"type":"string"},"trialEndsAt":{"type":"string","format":"date-time","nullable":true},"mrr":{"type":"number"},"arr":{"type":"number"},"studentCount":{"type":"integer"},"staffCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","cdsCode","name","shortName","state","city","type","subscriptionPlan","subscriptionStatus","trialEndsAt","mrr","arr","studentCount","staffCount","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Super Admin: provision a new district","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cdsCode":{"type":"string","minLength":2,"maxLength":12},"name":{"type":"string","minLength":2,"maxLength":200},"shortName":{"type":"string","maxLength":50,"nullable":true},"type":{"type":"string","enum":["PUBLIC","CHARTER","PRIVATE","DIOCESE","CONSORTIUM"]},"addressLine1":{"type":"string","minLength":2,"maxLength":200},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","minLength":5,"maxLength":10},"county":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","default":"America/New_York"},"subscriptionPlan":{"type":"string","default":"trial"},"subscriptionStatus":{"type":"string","enum":["trial","active","past_due","suspended","churned"],"default":"trial"},"trialDays":{"type":"integer","minimum":0,"maximum":365,"default":30},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["cdsCode","name","type","addressLine1","city","state","zipCode","county","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/audit":{"get":{"summary":"Recent platform audit entries","tags":["Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actorId":{"type":"string","nullable":true},"action":{"type":"string"},"targetDistrictId":{"type":"string","format":"uuid","nullable":true},"reason":{"type":"string"},"ipAddress":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","actorId","action","targetDistrictId","reason","ipAddress","metadata","occurredAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/feature-flags":{"get":{"summary":"Feature flags with per-district override counts","tags":["Platform"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"description":{"type":"string"},"defaultOn":{"type":"boolean"},"overrideCount":{"type":"integer"}},"required":["id","key","description","defaultOn","overrideCount"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Super Admin: create a feature flag","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":3,"maxLength":100,"pattern":"^[a-z][a-z0-9._-]*$"},"description":{"type":"string","minLength":3,"maxLength":500},"defaultOn":{"type":"boolean","default":false},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["key","description","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"description":{"type":"string"},"defaultOn":{"type":"boolean"},"overrideCount":{"type":"integer"}},"required":["id","key","description","defaultOn","overrideCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}":{"get":{"summary":"Super Admin: district detail","tags":["Platform"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cdsCode":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string","nullable":true},"type":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string"},"zipCode":{"type":"string"},"county":{"type":"string"},"timezone":{"type":"string"},"subscriptionPlan":{"type":"string"},"subscriptionStatus":{"type":"string"},"trialEndsAt":{"type":"string","format":"date-time","nullable":true},"activatedAt":{"type":"string","format":"date-time","nullable":true},"paidThroughDate":{"type":"string","format":"date-time","nullable":true},"contractStartDate":{"type":"string","format":"date-time","nullable":true},"contractEndDate":{"type":"string","format":"date-time","nullable":true},"autoRenew":{"type":"boolean"},"mrr":{"type":"number"},"arr":{"type":"number"},"studentCount":{"type":"integer"},"staffCount":{"type":"integer"},"userCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","cdsCode","name","shortName","type","addressLine1","addressLine2","city","state","zipCode","county","timezone","subscriptionPlan","subscriptionStatus","trialEndsAt","activatedAt","paidThroughDate","contractStartDate","contractEndDate","autoRenew","mrr","arr","studentCount","staffCount","userCount","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Super Admin: edit district","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"shortName":{"type":"string","maxLength":50,"nullable":true},"type":{"type":"string","enum":["PUBLIC","CHARTER","PRIVATE","DIOCESE","CONSORTIUM"]},"addressLine1":{"type":"string","minLength":2,"maxLength":200},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","minLength":5,"maxLength":10},"county":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string"},"subscriptionPlan":{"type":"string"},"autoRenew":{"type":"boolean"},"contractStartDate":{"type":"string","format":"date-time","nullable":true},"contractEndDate":{"type":"string","format":"date-time","nullable":true},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/status":{"post":{"summary":"Super Admin: activate / suspend / churn a district","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["trial","active","past_due","suspended","churned"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["status","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/users":{"get":{"summary":"Super Admin: list users of a district","tags":["Platform"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string","nullable":true},"status":{"type":"string"},"mfaEnabled":{"type":"boolean"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"lastLoginIp":{"type":"string","nullable":true},"failedLoginCount":{"type":"integer"},"personType":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","name","status","mfaEnabled","lastLoginAt","lastLoginIp","failedLoginCount","personType","roles","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/users/{userId}/status":{"post":{"summary":"Super Admin: activate / suspend / disable a district user","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended","disabled"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["status","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/users/{userId}/roles":{"patch":{"summary":"Super Admin: replace role set for a district user","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":0,"maxItems":20},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["roles","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"roles":{"type":"array","items":{"type":"string"}}},"required":["ok","roles"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"unknown":{"type":"array","items":{"type":"string"}}},"required":["error","unknown"],"additionalProperties":false}}}}}}},"/api/platform/v1/operators":{"get":{"summary":"Super Admin: list YRC operators","tags":["Platform"],"parameters":[{"schema":{"type":"string","maxLength":30},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"displayName":{"type":"string"},"role":{"type":"string"},"mfaEnabled":{"type":"boolean"},"status":{"type":"string"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"auditCount":{"type":"integer"},"isSystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","email","displayName","role","mfaEnabled","status","lastLoginAt","auditCount","isSystem","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Super Admin: invite a new YRC operator","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":200},"displayName":{"type":"string","minLength":2,"maxLength":200},"role":{"type":"string","enum":["platform_owner","platform_admin","platform_support","platform_engineer","platform_billing","platform_readonly"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["email","displayName","role","reason"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"temporaryPassword":{"type":"string"}},"required":["id","temporaryPassword"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/operators/{id}":{"patch":{"summary":"Super Admin: update YRC operator","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":2,"maxLength":200},"role":{"type":"string","enum":["platform_owner","platform_admin","platform_support","platform_engineer","platform_billing","platform_readonly"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/operators/{id}/status":{"post":{"summary":"Super Admin: activate / suspend / disable YRC operator","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended","disabled"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["status","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/operators/{id}/reset-password":{"post":{"summary":"Super Admin: generate a new temporary password","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"temporaryPassword":{"type":"string"}},"required":["temporaryPassword"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/feature-flags":{"get":{"summary":"Super Admin: all flags with this district's overrides","tags":["Platform"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"description":{"type":"string"},"defaultOn":{"type":"boolean"},"overrideCount":{"type":"integer"},"districtOverride":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"reason":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","enabled","reason","expiresAt"],"additionalProperties":false,"nullable":true}},"required":["id","key","description","defaultOn","overrideCount","districtOverride"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/feature-flags/{key}":{"patch":{"summary":"Super Admin: update feature flag default / description","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"defaultOn":{"type":"boolean"},"description":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":100},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key":{"type":"string"},"defaultOn":{"type":"boolean"},"description":{"type":"string"}},"required":["key","defaultOn","description"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/feature-flags/{key}/override":{"post":{"summary":"Super Admin: set a district-level feature flag override","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":"string","minLength":3,"maxLength":500},"expiresAt":{"type":"string","format":"date-time","nullable":true}},"required":["enabled","reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":100},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"districtId":{"type":"string","format":"uuid"},"flagKey":{"type":"string"},"enabled":{"type":"boolean"},"reason":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","districtId","flagKey","enabled","reason","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Super Admin: remove a district-level feature flag override","tags":["Platform"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","maxLength":100},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/tenant-pool":{"get":{"summary":"Tenant pool inventory by state","tags":["Platform"],"description":"How many pre-seeded districts are unclaimed and how many are running as pilots, per state. Drives the top-up decision.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"available":{"type":"integer"},"claimed":{"type":"integer"}},"required":["state","available","claimed"],"additionalProperties":false}},"meta":{"type":"object","properties":{"totalAvailable":{"type":"integer"},"totalClaimed":{"type":"integer"},"hostSuffix":{"type":"string"}},"required":["totalAvailable","totalClaimed","hostSuffix"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/tenant-pool/slots":{"get":{"summary":"Every pool slot, claimed or not","tags":["Platform"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"query","name":"state","required":false},{"schema":{"type":"string","enum":["available","claimed"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"subdomain":{"type":"string","nullable":true},"state":{"type":"string"},"status":{"type":"string","enum":["available","claimed"]},"organization":{"type":"string"},"claimedBy":{"type":"string","nullable":true},"claimedAt":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"awaitingRefill":{"type":"boolean"}},"required":["districtId","subdomain","state","status","organization","claimedBy","claimedAt","expiresAt","awaitingRefill"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/tenant-pool/claim":{"post":{"summary":"Claim a pre-seeded district for a prospect","tags":["Platform"],"description":"Takes one unclaimed slot, renames it to the prospect’s organization, creates their district administrator, starts the pilot clock and returns a sign-in link. The password is generated here and returned exactly once.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"string","minLength":2,"maxLength":200},"adminEmail":{"type":"string","format":"email","maxLength":200},"adminFirstName":{"type":"string","minLength":1,"maxLength":100},"adminLastName":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"pilotDays":{"type":"integer","minimum":1,"maximum":365}},"required":["organization","adminEmail","adminFirstName","adminLastName"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"subdomain":{"type":"string"},"state":{"type":"string"},"organization":{"type":"string"},"adminEmail":{"type":"string"},"temporaryPassword":{"type":"string"},"signInUrl":{"type":"string"},"expiresAt":{"type":"string"}},"required":["districtId","subdomain","state","organization","adminEmail","temporaryPassword","signInUrl","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error","detail"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error","detail"],"additionalProperties":false}}}}}}},"/api/platform/v1/tenant-pool/expired":{"get":{"summary":"Pilots past their end date","tags":["Platform"],"description":"Reported, never released automatically: releasing a slot deletes a prospect’s work, and that should be somebody’s decision.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"subdomain":{"type":"string","nullable":true},"organization":{"type":"string"},"expiredAt":{"type":"string"},"claimedBy":{"type":"string","nullable":true}},"required":["districtId","subdomain","organization","expiredAt","claimedBy"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/tenant-pool/{districtId}/release":{"post":{"summary":"Return a claimed slot to the pool","tags":["Platform"],"description":"Removes the pilot administrator and everything private to them (sessions, My day, ITW/IRW membership, AI conversations, drafts), hands their shared records to the seeded district admin, removes colleagues they invited, marks their lead released and restores the seeded district name. The slot is then queued for refill: unclaimable until the trial keeper has wiped it, seeded it again and run the normal fill.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string"},"status":{"type":"string"}},"required":["districtId","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/connectors":{"get":{"summary":"List available connectors and their configuration status for a district","tags":["Platform · Integrations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"vendor":{"type":"string"},"version":{"type":"string"},"supportsBackfill":{"type":"boolean"},"supportsRealtime":{"type":"boolean"},"isConfigured":{"type":"boolean"},"lastSyncedAt":{"type":"string","format":"date-time","nullable":true},"lastSyncStatus":{"type":"string","nullable":true}},"required":["id","displayName","vendor","version","supportsBackfill","supportsRealtime","isConfigured","lastSyncedAt","lastSyncStatus"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/connectors/{id}/config":{"put":{"summary":"Upsert a connector configuration for a district","tags":["Platform · Integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"config":{"type":"object","additionalProperties":{},"default":{}},"secretRefs":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"isActive":{"type":"boolean","default":true}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connectorId":{"type":"string"},"displayName":{"type":"string"},"isActive":{"type":"boolean"},"config":{"type":"object","additionalProperties":{}},"secretRefs":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","connectorId","displayName","isActive","config","secretRefs"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/sync-runs":{"get":{"summary":"History of connector sync runs for a district","tags":["Platform · Integrations"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string"},"in":"query","name":"connectorId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connectorId":{"type":"string"},"mode":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true},"recordsRead":{"type":"integer"},"eventsEmitted":{"type":"integer"},"failures":{"type":"integer"},"errorMessage":{"type":"string","nullable":true},"stats":{"type":"object","additionalProperties":{},"nullable":true}},"required":["id","connectorId","mode","status","startedAt","completedAt","recordsRead","eventsEmitted","failures","errorMessage","stats"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","nullable":true},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"},"totalApprox":{"type":"integer","minimum":0}},"required":["cursor","nextCursor","hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","pagination","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/genesis/import":{"post":{"summary":"Import a Genesis CSV export into a district","tags":["Platform · Integrations"],"description":"Paste CSV bodies directly. Default `dryRun: true` — run once to preview counts, then set false to apply.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","default":true},"studentsCsv":{"type":"string","minLength":10},"guardiansCsv":{"type":"string"},"enrollmentsCsv":{"type":"string","minLength":10}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"dryRun":{"type":"boolean"},"stats":{"type":"object","properties":{"personsCreated":{"type":"integer"},"personsUpdated":{"type":"integer"},"guardianshipsLinked":{"type":"integer"},"enrollmentsCreated":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string"},"localId":{"type":"string"},"message":{"type":"string"}},"required":["recordType","message"],"additionalProperties":false}}},"required":["personsCreated","personsUpdated","guardianshipsLinked","enrollmentsCreated","errors"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["runId","dryRun","stats","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/powerschool/import":{"post":{"summary":"Import a PowerSchool CSV export into a district","tags":["Platform · Integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","default":true},"studentsCsv":{"type":"string","minLength":10},"guardiansCsv":{"type":"string"},"enrollmentsCsv":{"type":"string","minLength":10}},"required":["studentsCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"dryRun":{"type":"boolean"},"stats":{"type":"object","properties":{"personsCreated":{"type":"integer"},"personsUpdated":{"type":"integer"},"guardianshipsLinked":{"type":"integer"},"enrollmentsCreated":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string"},"localId":{"type":"string"},"message":{"type":"string"}},"required":["recordType","message"],"additionalProperties":false}}},"required":["personsCreated","personsUpdated","guardianshipsLinked","enrollmentsCreated","errors"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["runId","dryRun","stats","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/oneroster/import":{"post":{"summary":"Import a OneRoster 1.2 CSV set into a district","tags":["Platform · Integrations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","default":true},"usersCsv":{"type":"string","minLength":10},"enrollmentsCsv":{"type":"string","minLength":10}},"required":["usersCsv","enrollmentsCsv"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"dryRun":{"type":"boolean"},"stats":{"type":"object","properties":{"personsCreated":{"type":"integer"},"personsUpdated":{"type":"integer"},"guardianshipsLinked":{"type":"integer"},"enrollmentsCreated":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string"},"localId":{"type":"string"},"message":{"type":"string"}},"required":["recordType","message"],"additionalProperties":false}}},"required":["personsCreated","personsUpdated","guardianshipsLinked","enrollmentsCreated","errors"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["runId","dryRun","stats","warnings"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/lti/launch":{"post":{"summary":"Canvas LTI 1.3 launch endpoint (scaffold)","tags":["Platform · Integrations"],"description":"Accepts the LTI 1.3 `id_token` POST from Canvas, validates the JWT against the configured platform keys, and redirects the user into Forge with a session. M11 ships the endpoint shape; full JWT validation + user provisioning lands when a district configures Canvas.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id_token":{"type":"string","minLength":1},"state":{"type":"string","minLength":1}},"required":["id_token","state"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ltiAccepted":{"type":"boolean","enum":[true]},"redirectTo":{"type":"string"}},"required":["ltiAccepted","redirectTo"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/lti/schoology/config":{"get":{"summary":"Schoology LTI 1.3 registration metadata","tags":["Platform · Integrations"],"description":"Returns the Schoology LTI 1.3 registration payload. Requires `integration.admin` permission. Use this to populate Schoology LTI tool registration manually or via the register endpoint.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"platform":{"type":"string"},"platformUrl":{"type":"string"},"keysetUrl":{"type":"string"},"authEndpoint":{"type":"string"},"tokenEndpoint":{"type":"string"},"registrationPayload":{"type":"object","additionalProperties":{}}},"required":["platform","platformUrl","keysetUrl","authEndpoint","tokenEndpoint","registrationPayload"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/lti/schoology/register":{"post":{"summary":"Register Forge as Schoology LTI 1.3 tool","tags":["Platform · Integrations"],"description":"Calls Schoology API to register the Forge SIS LTI tool for a district.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1},"apiSecret":{"type":"string","minLength":1}},"required":["apiKey","apiSecret"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"toolId":{"type":"string"},"clientId":{"type":"string"},"applicationId":{"type":"string"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/lti/blackboard/config":{"get":{"summary":"Blackboard LTI 1.3 registration metadata","tags":["Platform · Integrations"],"description":"Returns the Blackboard LTI 1.3 registration payload. Requires `integration.admin` permission. Use this to populate Blackboard LTI tool registration manually or via the register endpoint.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"districtId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"platform":{"type":"string"},"platformUrl":{"type":"string"},"keysetUrl":{"type":"string"},"authEndpoint":{"type":"string"},"tokenEndpoint":{"type":"string"},"registrationPayload":{"type":"object","additionalProperties":{}}},"required":["platform","platformUrl","keysetUrl","authEndpoint","tokenEndpoint","registrationPayload"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/integrations/districts/{districtId}/lti/blackboard/register":{"post":{"summary":"Register Forge as Blackboard LTI 1.3 tool","tags":["Platform · Integrations"],"description":"Calls Blackboard API to register the Forge SIS LTI tool for a district.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1},"apiSecret":{"type":"string","minLength":1}},"required":["apiKey","apiSecret"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"toolId":{"type":"string"},"clientId":{"type":"string"},"applicationId":{"type":"string"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"traceId":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/billing":{"get":{"summary":"Get subscription info for a district","tags":["Platform · Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","professional","enterprise"]},"status":{"type":"string","enum":["active","trialing","past_due","cancelled"]},"stripeCustomerId":{"type":"string"},"stripeSubscriptionId":{"type":"string"},"currentPeriodEnd":{"type":"string"},"trialEndsAt":{"type":"string"},"aiUsageCentsTotal":{"type":"number"}},"required":["plan","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/billing/create-customer":{"post":{"summary":"Create a Stripe customer for a district","tags":["Platform · Billing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":500,"default":"Customer created via signup."}},"required":["email","name"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"stripeCustomerId":{"type":"string"}},"required":["stripeCustomerId"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/billing/subscribe":{"post":{"summary":"Create a Stripe subscription for a district","tags":["Platform · Billing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"priceId":{"type":"string","minLength":1},"plan":{"type":"string","enum":["starter","professional","enterprise"]},"reason":{"type":"string","minLength":3,"maxLength":500,"default":"Subscription created."}},"required":["priceId","plan"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string"},"clientSecret":{"type":"string"}},"required":["subscriptionId"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/billing/cancel":{"post":{"summary":"Cancel the Stripe subscription for a district","tags":["Platform · Billing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/invoices":{"get":{"summary":"List invoices for a district","tags":["Platform · Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"stripeInvoiceId":{"type":"string"},"stripeInvoiceUrl":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"totalCents":{"type":"integer"},"status":{"type":"string"},"pdfUrl":{"type":"string"},"aiUsageCredits":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","totalCents","status","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/billing/prospects":{"get":{"summary":"List Stripe checkouts pending or completed district provisioning","tags":["Platform — Billing"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"provisioned","required":false},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"auditId":{"type":"string","format":"uuid"},"customerEmail":{"type":"string","nullable":true},"planCode":{"type":"string","nullable":true},"amountTotalCents":{"type":"integer"},"currency":{"type":"string"},"stripeSessionId":{"type":"string"},"stripeCustomerId":{"type":"string","nullable":true},"stripeSubscriptionId":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time"},"provisioned":{"type":"boolean"},"provisionedDistrictId":{"type":"string","format":"uuid","nullable":true}},"required":["auditId","customerEmail","planCode","amountTotalCents","currency","stripeSessionId","stripeCustomerId","stripeSubscriptionId","receivedAt","provisioned","provisionedDistrictId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/billing/prospects/{auditId}/provision":{"post":{"summary":"Provision a District + initial district_admin user from a prospect","tags":["Platform — Billing"],"description":"Creates the District row using the supplied details, an initial User with the prospect email as a district_admin, and binds the existing Stripe customer/subscription. Idempotent — if the prospect was already provisioned, returns the existing districtId.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cdsCode":{"type":"string","minLength":1,"maxLength":12},"name":{"type":"string","minLength":1,"maxLength":200},"shortName":{"type":"string","maxLength":50},"type":{"type":"string","enum":["PUBLIC","CHARTER","PRIVATE","DIOCESE","CONSORTIUM"]},"addressLine1":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"zipCode":{"type":"string","minLength":5,"maxLength":10},"county":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":50,"default":"America/New_York"},"adminPassword":{"type":"string","minLength":12,"maxLength":72}},"required":["cdsCode","name","type","addressLine1","city","state","zipCode","county"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"auditId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"adminUserId":{"type":"string","format":"uuid"},"adminEmail":{"type":"string"},"welcomeEmailSent":{"type":"boolean"}},"required":["districtId","adminUserId","adminEmail"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/logs/processes":{"get":{"summary":"List PM2 processes with status + uptime","tags":["Platform — Logs"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"processes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"},"restarts":{"type":"integer"},"uptimeMs":{"type":"integer","nullable":true},"memoryBytes":{"type":"integer","nullable":true},"pmId":{"type":"integer","nullable":true}},"required":["name","status","restarts","uptimeMs","memoryBytes","pmId"],"additionalProperties":false}}},"required":["processes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/logs/tail":{"get":{"summary":"Tail the last N lines of a process log","tags":["Platform — Logs"],"parameters":[{"schema":{"type":"string","enum":["forge-api","forge-web","forge-admin","forge-worker","forge-monitor","forge-nightly-projections","forge-nightly-truancy","forge-nightly-asset-book-values","forge-nightly-dashboard-snapshots","forge-nightly-backup-upload"]},"in":"query","name":"process","required":true},{"schema":{"type":"string","enum":["out","err"],"default":"out"},"in":"query","name":"stream","required":false},{"schema":{"type":"integer","minimum":10,"maximum":2000,"default":200},"in":"query","name":"lines","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"process":{"type":"string"},"stream":{"type":"string","enum":["out","err"]},"lines":{"type":"integer"},"log":{"type":"string"}},"required":["process","stream","lines","log"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/queues":{"get":{"summary":"List BullMQ queue depths","tags":["Platform — Queues"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"waiting":{"type":"integer"},"active":{"type":"integer"},"delayed":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"paused":{"type":"integer"}},"required":["name","waiting","active","delayed","completed","failed","paused"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/queues/{name}/failed":{"get":{"summary":"List recent failed jobs in a queue","tags":["Platform — Queues"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"name","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"attemptsMade":{"type":"integer"},"failedReason":{"type":"string","nullable":true},"data":{},"timestamp":{"type":"integer","nullable":true},"finishedOn":{"type":"integer","nullable":true}},"required":["id","name","attemptsMade","failedReason","timestamp","finishedOn"],"additionalProperties":false}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"timestamp":{"type":"string"},"correlationId":{"type":"string"}},"required":["requestId","timestamp"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{id}/ai-usage":{"get":{"summary":"Per-district AI usage report for billing passthrough","tags":["Platform · Billing"],"description":"Returns AI token counts and USD cost for a district in the given period. If `from` and `to` are omitted, defaults to the rolling 30-day window. The `invoiceLineItem` field is pre-formatted for inclusion on a platform invoice.","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"totalCents":{"type":"integer"},"tokenCount":{"type":"integer"},"invoiceLineItem":{"type":"object","properties":{"description":{"type":"string"},"totalCents":{"type":"integer"},"tokenCount":{"type":"integer"}},"required":["description","totalCents","tokenCount"],"additionalProperties":false,"nullable":true}},"required":["districtId","periodStart","periodEnd","totalCents","tokenCount","invoiceLineItem"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/reconciler/run":{"post":{"summary":"Trigger projection reconciliation (all districts or one)","tags":["Platform","Reconciler"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string"},"ranAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer"},"findings":{"type":"array","items":{"type":"object","properties":{"checkName":{"type":"string"},"districtId":{"type":"string"},"expected":{"anyOf":[{"type":"number"},{"type":"string"}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]},"driftPct":{"type":"number"},"severity":{"type":"string","enum":["info","warn","critical"]}},"required":["checkName","districtId","expected","actual","driftPct","severity"],"additionalProperties":false}}},"required":["districtId","ranAt","durationMs","findings"],"additionalProperties":false}},"totalMs":{"type":"integer"}},"required":["results","totalMs"],"additionalProperties":false}}}}}}},"/api/platform/v1/reconciler/status":{"get":{"summary":"Last reconciler run summary per district","tags":["Platform","Reconciler"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"criticalOnly","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"districtId":{"type":"string","format":"uuid"},"name":{"type":"string"},"lastRun":{"type":"object","properties":{"ranAt":{"type":"string"},"durationMs":{"type":"number"},"criticalFindings":{"type":"array","items":{"type":"object","properties":{"checkName":{"type":"string"},"districtId":{"type":"string"},"expected":{"anyOf":[{"type":"number"},{"type":"string"}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]},"driftPct":{"type":"number"},"severity":{"type":"string","enum":["info","warn","critical"]}},"required":["checkName","districtId","expected","actual","driftPct","severity"],"additionalProperties":false}}},"required":["ranAt","durationMs","criticalFindings"],"additionalProperties":false,"nullable":true}},"required":["districtId","name","lastRun"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{districtId}/api-keys":{"get":{"summary":"Super Admin: list API keys for a district","tags":["Platform"],"description":"Returns all non-revoked API keys for the district. The key hash is never returned.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"ipAllowlist":{"type":"array","items":{"type":"string"},"nullable":true},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"}},"required":["requestsPerMinute"],"additionalProperties":false,"nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","type","keyPrefix","scopes","ipAllowlist","rateLimit","lastUsedAt","expiresAt","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Super Admin: create an API key for a district","tags":["Platform"],"description":"Generates a cryptographically random key. The plaintext key is returned ONCE and cannot be retrieved again.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["public","secret","admin","partner"]},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1},"expiresAt":{"type":"string","format":"date-time","nullable":true},"ipAllowlist":{"type":"array","items":{"type":"string","minLength":1,"maxLength":45},"nullable":true},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"integer","minimum":1,"maximum":100000}},"required":["requestsPerMinute"],"additionalProperties":false}},"required":["name","type","scopes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"plaintextKey":{"type":"string"}},"required":["id","name","type","keyPrefix","scopes","expiresAt","createdAt","plaintextKey"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/districts/{districtId}/api-keys/{keyId}":{"delete":{"summary":"Super Admin: revoke an API key","tags":["Platform"],"description":"Soft-deletes the key by setting revokedAt to now. The key stops working immediately.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"districtId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"keyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/platform/v1/webhooks/stripe/billing":{"post":{"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://api.forgesis.com/v1","description":"Production"},{"url":"https://api.staging.forgesis.com/v1","description":"Staging"},{"url":"http://localhost:4000/v1","description":"Local dev"}],"security":[{"bearerAuth":[]},{"apiKey":[]}],"tags":[{"name":"Meta","description":"Health, readiness, version."},{"name":"Students","description":"Student records and derived data."},{"name":"Guardians","description":"Parent/guardian records."},{"name":"Staff","description":"Staff and faculty records."},{"name":"Sections","description":"Course sections and rosters."},{"name":"Attendance","description":"Daily and period attendance."},{"name":"Gradebook","description":"Assignments, scores, and posted grades."},{"name":"Scheduling","description":"Courses, terms, and master schedule."},{"name":"Health","description":"Nurse visits, medications, immunizations, screenings."},{"name":"Discipline","description":"Incidents, actions, HIB investigations."},{"name":"Communications","description":"Messages, broadcasts, templates."},{"name":"Registration","description":"Online enrollment submissions."},{"name":"Reports","description":"Standard, custom, and NL reports."},{"name":"Compliance","description":"State reporting and compliance checks."},{"name":"Webhooks","description":"Outbound event subscriptions."},{"name":"Admin","description":"District administrator tools."}]}