{"openapi":"3.1.0","info":{"title":"Scarlet Sync ChatGPT Connector","version":"2.1.0","description":"OpenAI-compatible connector for Scarlet Sync, the Rutgers academic planning assistant. Search courses and majors, inspect section details, build real schedule options, and create or update full degree plans with semester-level edits.\n"},"servers":[{"url":"https://scarletsync.app","description":"Production"}],"paths":{"/api/chatgpt/courses/search":{"get":{"summary":"Search Rutgers courses","operationId":"searchCourses","description":"Search Rutgers courses by keyword, department, campus, or semester. Undergrad (< 500) ranked first. Use q= for keywords or department= to browse. Returns summaries only — call getCourse for sections. total = all matches; courses = paged slice (default 20, max 50).\n","security":[{"OAuth2":["courses:read"]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"department","in":"query","schema":{"type":"string"}},{"name":"campus","in":"query","schema":{"type":"string","enum":["Busch","Livingston","College Avenue","C/D","Newark","Camden","Online"]}},{"name":"semester","in":"query","schema":{"type":"string","enum":["spring2025","winter2025","fall2025","spring2026","summer2026","fall2026"],"default":"fall2026"}},{"name":"open_only","in":"query","schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Matching courses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseSearchResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/courses/{courseId}":{"get":{"summary":"Get full course details","operationId":"getCourse","description":"Returns one course with all sections, meeting times, instructors, and section open/closed flags. courseId is the base course ID returned by searchCourses.\n","security":[{"OAuth2":["courses:read"]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string"}},{"name":"semester","in":"query","schema":{"type":"string","enum":["spring2025","winter2025","fall2025","spring2026","summer2026","fall2026"],"default":"fall2026"}}],"responses":{"200":{"description":"Course details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/open-sections":{"get":{"summary":"Check real-time section availability","operationId":"getOpenSections","description":"Returns current open/closed status for one or more registration indexes.\n","security":[{"OAuth2":["courses:read"]}],"parameters":[{"name":"indexes","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated list of 5-digit registration indexes."}],"responses":{"200":{"description":"Section open status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenSectionsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/research":{"get":{"summary":"Search Rutgers research opportunities and professor research context","operationId":"searchResearchOpportunities","description":"Search Scarlet Sync's Rutgers research-opportunity dataset first. For professor-name queries with no structured opening match, the response may also include grounded Rutgers web findings about that professor or lab so the assistant can still answer what they work on.\n","security":[{"OAuth2":["degree:read"]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"department","in":"query","schema":{"type":"string"}},{"name":"program_type","in":"query","schema":{"type":"string"}},{"name":"campus","in":"query","schema":{"type":"string"}},{"name":"subject","in":"query","schema":{"type":"string"}},{"name":"has_compensation","in":"query","schema":{"type":"boolean"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Structured research opportunities plus optional grounded Rutgers web fallback","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchSearchResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/degrees/search":{"get":{"summary":"Search Rutgers majors and minors","operationId":"searchDegrees","description":"Search Rutgers degrees by major name or degree code. Use this when the user is exploring majors, minors, or alternate degree paths.\n","security":[{"OAuth2":["degree:read"]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"include_minors","in":"query","schema":{"type":"boolean","default":true}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"Matching degrees","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DegreeSearchResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/degrees/{degreeId}":{"get":{"summary":"Get degree requirement groups","operationId":"getDegree","description":"Returns degree metadata plus a simplified requirement-group tree for the selected major or minor.\n","security":[{"OAuth2":["degree:read"]}],"parameters":[{"name":"degreeId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Degree details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DegreeDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/schedules":{"get":{"summary":"List the user's saved schedules","operationId":"listSchedules","security":[{"OAuth2":["schedules:read"]}],"responses":{"200":{"description":"Saved schedules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Create a new schedule from section indexes","operationId":"createSchedule","description":"Create a saved Rutgers schedule. Pass classes as 5-digit section indexes from getCourse or generateSchedules. The server resolves them to full course records before saving.\n","security":[{"OAuth2":["schedules:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleRequest"}}}},"responses":{"200":{"description":"Created schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/schedules/{scheduleId}":{"get":{"summary":"Get a saved schedule","operationId":"getSchedule","description":"Returns one saved schedule with section details, credits, and conflict detection.\n","security":[{"OAuth2":["schedules:read"]}],"parameters":[{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Schedule details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Update a saved schedule","operationId":"updateSchedule","description":"Update the name, primary flag, or section indexes for a saved schedule. When classes is provided, pass the full replacement list of 5-digit indexes.\n","security":[{"OAuth2":["schedules:write"]}],"parameters":[{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleRequest"}}}},"responses":{"200":{"description":"Updated schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Delete a saved schedule","operationId":"deleteSchedule","security":[{"OAuth2":["schedules:write"]}],"parameters":[{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Schedule deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/schedules/generate":{"post":{"summary":"Generate ranked schedule options from course base IDs","operationId":"generateSchedules","description":"Generate conflict-free schedule options from course base IDs. The server normalizes legacy aliases, returns the normalized term, and includes a top-level summary with total options, course count, credit total, and whether closed sections were included or open-only filters were enforced.\n","security":[{"OAuth2":["schedules:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSchedulesRequest"}}}},"responses":{"200":{"description":"Ranked schedule options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSchedulesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/degree-plan":{"get":{"summary":"Get the latest active degree plan","operationId":"getDegreePlan","description":"Returns the user's most recent degree plan with summary progress, requirement groups, semester overview, and previously taken Rutgers-equivalent classes.\n","security":[{"OAuth2":["degree:read"]}],"responses":{"200":{"description":"Degree plan summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DegreePlanSummary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"summary":"Create a degree plan","operationId":"createDegreePlan","description":"Create a new degree plan. You may optionally include semesters to create a full plan in one call.\n","security":[{"OAuth2":["degree:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDegreePlanRequest"}}}},"responses":{"200":{"description":"Created degree plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDegreePlanResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/degree-plan/{planId}":{"get":{"summary":"Get a full degree plan","operationId":"getDegreePlanById","description":"Returns one degree plan with semesters, tracked degree IDs, metadata, and previously taken Rutgers-equivalent classes.\n","security":[{"OAuth2":["degree:read"]}],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Degree plan details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DegreePlanDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Update degree plan metadata or whole semesters array","operationId":"updateDegreePlan","security":[{"OAuth2":["degree:write"]}],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDegreePlanRequest"}}}},"responses":{"200":{"description":"Updated degree plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/degree-plan/{planId}/semesters":{"patch":{"summary":"Apply semester-by-semester edits to a degree plan","operationId":"updateDegreePlanSemesters","description":"Apply structured semester operations such as add_course, move_course, add_prerequisite_chain, create_semester, and delete_semester.\n","security":[{"OAuth2":["degree:write"]}],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDegreePlanSemestersRequest"}}}},"responses":{"200":{"description":"Updated degree plan semesters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDegreePlanSemestersResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/profile":{"get":{"summary":"Get the authenticated user's profile and academic context","operationId":"getProfile","security":[{"OAuth2":["profile:read"]}],"responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/profile/preferences":{"patch":{"summary":"Update profile preferences","operationId":"updateProfilePreferences","security":[{"OAuth2":["profile:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["preferences"],"properties":{"preferences":{"type":"object"}}}}}},"responses":{"200":{"description":"Profile preferences updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/profile/academic-history":{"patch":{"summary":"Update academic history","operationId":"updateAcademicHistory","security":[{"OAuth2":["profile:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAcademicHistoryRequest"}}}},"responses":{"200":{"description":"Academic history updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAcademicHistoryResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/sirs":{"get":{"summary":"Search or fetch SIRS data","operationId":"getSirs","description":"Unified SIRS operation. Use type=search for broad lookup, type=course with courseId for course detail, or type=professor with name for professor detail.\n","security":[{"OAuth2":["sirs:read"]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["search","course","professor"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Required when type=search."},{"name":"searchType","in":"query","schema":{"type":"string","enum":["professor","course","department","both"]},"description":"Optional search subtype when type=search."},{"name":"courseId","in":"query","schema":{"type":"string"},"description":"Required when type=course."},{"name":"name","in":"query","schema":{"type":"string"},"description":"Required when type=professor."}],"responses":{"200":{"description":"SIRS search or detail response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SirsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/course-lists":{"get":{"summary":"List course lists","operationId":"listCourseLists","security":[{"OAuth2":["course-lists:read"]}],"parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["official","public","mine"]}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Course lists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseListsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Create a course list","operationId":"createCourseList","security":[{"OAuth2":["course-lists:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCourseListRequest"}}}},"responses":{"200":{"description":"Created course list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseListDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/course-lists/{listId}":{"get":{"summary":"Get a course list","operationId":"getCourseList","security":[{"OAuth2":["course-lists:read"]}],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Course list detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseListDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"patch":{"summary":"Update a course list","operationId":"updateCourseList","security":[{"OAuth2":["course-lists:write"]}],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCourseListRequest"}}}},"responses":{"200":{"description":"Updated course list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseListDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/feedback":{"post":{"summary":"Submit the feedback form","operationId":"submitFeedback","security":[{"OAuth2":["feedback:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"200":{"description":"Feedback submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chatgpt/degrees/check":{"post":{"summary":"Check degree requirements against completed courses","operationId":"checkDegreeRequirements","description":"Check how many requirements of a degree are satisfied given the user's completed courses (auto-loaded from profile unless use_saved_courses=false). Pass degreeId as a numeric ID or a degree name string for fuzzy lookup.\n","security":[{"OAuth2":["degree:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDegreeRequest"}}}},"responses":{"200":{"description":"Degree requirement audit","content":{"application/json":{"schema":{"type":"object","properties":{"satisfied":{"type":"integer"},"total":{"type":"integer"},"missing":{"type":"array","items":{"type":"string"}},"details":{"type":"object","additionalProperties":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/courses/{courseId}/prerequisites":{"get":{"summary":"Check if the user satisfies a course's prerequisites","operationId":"checkCoursePrerequisites","security":[{"OAuth2":["courses:read"]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string"}},{"name":"semester","in":"query","schema":{"type":"string","enum":["spring2025","winter2025","fall2025","spring2026","summer2026","fall2026"],"default":"fall2026"}}],"responses":{"200":{"description":"Prerequisite check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrerequisiteCheckResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/chatgpt/memory":{"get":{"summary":"List all stored AI memories","operationId":"listMemories","description":"Retrieve all personal preferences and facts stored for the user.","security":[{"OAuth2":["profile:read"]}],"responses":{"200":{"description":"Stored memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoriesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Store or update an AI memory","operationId":"addMemory","description":"Save a personal preference or fact. Uses upsert — calling again with the same key overwrites the previous value.\n","security":[{"OAuth2":["profile:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemoryRequest"}}}},"responses":{"200":{"description":"Memory stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemoryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://scarletsync.app/api/oauth/authorize","tokenUrl":"https://scarletsync.app/api/oauth/token","scopes":{"courses:read":"Search and browse Rutgers courses","schedules:read":"View schedules and generate schedule options","schedules:write":"Create, update, and delete schedules","degree:read":"Search majors and view degree plans","degree:write":"Create, update, and delete degree plans","profile:read":"View profile, preferences, and academic history","profile:write":"Update preferences and academic history","sirs:read":"View SIRS course, professor, and department data","course-lists:read":"View official, public, and owned course lists","course-lists:write":"Create, update, duplicate, and delete owned course lists","feedback:write":"Submit feedback, bug reports, and feature requests"}}}}},"schemas":{"MeetingTime":{"type":"object","properties":{"day":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"building":{"type":"string"},"campus":{"type":"string"}}},"CourseSection":{"type":"object","properties":{"index":{"type":"string"},"sectionNumber":{"type":"string"},"isOpen":{"type":"boolean"},"instructors":{"type":"array","items":{"type":"string"}},"meetingTimes":{"type":"array","items":{"$ref":"#/components/schemas/MeetingTime"}},"credits":{"type":"number","nullable":true},"sectionNotes":{"type":"string","nullable":true}}},"CourseSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"fullTitle":{"type":"string"},"department":{"type":"string"},"campus":{"type":"string"},"campuses":{"type":"array","items":{"type":"string"}},"credits":{"type":"number","nullable":true},"description":{"type":"string","nullable":true},"prerequisites":{"type":"string","nullable":true},"openSectionsCount":{"type":"integer"},"totalSectionsCount":{"type":"integer"},"semester":{"type":"string"}}},"CourseDetail":{"allOf":[{"$ref":"#/components/schemas/CourseSummary"},{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/CourseSection"}}}}]},"CourseSearchResponse":{"type":"object","properties":{"courses":{"type":"array","items":{"$ref":"#/components/schemas/CourseSummary"}},"total":{"type":"integer"},"semester":{"type":"string"}}},"DegreeSummary":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"degreeCode":{"type":"string"},"startTerm":{"type":"string"}}},"DegreeRequirementNode":{"type":"object","properties":{"title":{"type":"string"},"logic":{"type":"string"},"coursesNeeded":{"type":"integer","nullable":true},"minimumCredits":{"type":"number","nullable":true},"poolSize":{"type":"integer"},"sampleCourses":{"type":"array","items":{"type":"string"}},"requirements":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"logic":{"type":"string"},"coursesNeeded":{"type":"integer","nullable":true},"minimumCredits":{"type":"number","nullable":true},"poolSize":{"type":"integer"},"sampleCourses":{"type":"array","items":{"type":"string"}}}}}}},"DegreeDetail":{"allOf":[{"$ref":"#/components/schemas/DegreeSummary"},{"type":"object","properties":{"requirementGroups":{"type":"array","items":{"$ref":"#/components/schemas/DegreeRequirementNode"}}}}]},"DegreeSearchResponse":{"type":"object","properties":{"degrees":{"type":"array","items":{"$ref":"#/components/schemas/DegreeSummary"}},"total":{"type":"integer"}}},"ScheduleSummary":{"type":"object","properties":{"scheduleId":{"type":"string","format":"uuid"},"name":{"type":"string"},"termId":{"type":"string"},"isPrimary":{"type":"boolean"},"courseCount":{"type":"integer"},"totalCredits":{"type":"number"},"isPublic":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}}},"ScheduledCourseDetail":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"sectionIndex":{"type":"string"},"sectionNumber":{"type":"string"},"credits":{"type":"number","nullable":true},"instructors":{"type":"array","items":{"type":"string"}},"meetingTimes":{"type":"array","items":{"$ref":"#/components/schemas/MeetingTime"}}}},"ConflictInfo":{"type":"object","properties":{"type":{"type":"string","enum":["time_overlap","travel_time"]},"courseA":{"type":"string"},"courseB":{"type":"string"},"day":{"type":"string"},"overlapMinutes":{"type":"integer","nullable":true},"gapMinutes":{"type":"integer","nullable":true},"requiredTravelMinutes":{"type":"integer","nullable":true}}},"ScheduleListResponse":{"type":"object","properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleSummary"}},"total":{"type":"integer"}}},"ScheduleDetail":{"allOf":[{"$ref":"#/components/schemas/ScheduleSummary"},{"type":"object","properties":{"courses":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledCourseDetail"}},"hasConflicts":{"type":"boolean"},"conflicts":{"type":"array","items":{"$ref":"#/components/schemas/ConflictInfo"}}}}]},"GeneratedScheduleSection":{"type":"object","properties":{"id":{"type":"string"},"baseId":{"type":"string"},"name":{"type":"string"},"section":{"type":"string"},"isOpen":{"type":"boolean","nullable":true},"credits":{"type":"number","nullable":true},"instructors":{"type":"array","items":{"type":"string"}},"meetingTimes":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedScheduleMeeting"}}}},"GeneratedScheduleMeeting":{"type":"object","properties":{"day":{"type":"string"},"startMinute":{"type":"integer"},"endMinute":{"type":"integer"},"startTime":{"type":"string"},"endTime":{"type":"string"},"location":{"type":"string"},"building":{"type":"string"},"campus":{"type":"string"}}},"GeneratedScheduleOption":{"type":"object","properties":{"rank":{"type":"integer"},"score":{"type":"number"},"totalCredits":{"type":"number"},"hasConflicts":{"type":"boolean"},"conflicts":{"type":"array","items":{"$ref":"#/components/schemas/ConflictInfo"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedScheduleSection"}}}},"GenerateSchedulesRequest":{"type":"object","required":["courseIds"],"properties":{"courseIds":{"type":"array","items":{"type":"string"},"description":"Course base IDs like 01198111 or 01:198:111."},"termId":{"type":"string","description":"Term ID like fall-2026 or spring-2026."},"openOnly":{"type":"boolean"},"maxResults":{"type":"integer"},"lockedSectionIndexes":{"type":"array","items":{"type":"string"}},"preferences":{"type":"object","properties":{"earliestStartMinute":{"type":"integer"},"latestEndMinute":{"type":"integer"},"preferredCampuses":{"type":"array","items":{"type":"string"}},"avoidDays":{"type":"array","items":{"type":"string"}},"noFriday":{"type":"boolean"}}}}},"GenerateSchedulesResponse":{"type":"object","properties":{"semester":{"type":"string"},"normalizedTermId":{"type":"string"},"missingCourses":{"type":"array","items":{"type":"string"}},"totalOptionsFound":{"type":"integer"},"summary":{"type":"object","properties":{"totalOptionsFound":{"type":"integer"},"courseCount":{"type":"integer"},"creditTotal":{"type":"number"},"openOnlyFiltered":{"type":"boolean"},"availabilityMode":{"type":"string"},"closedSectionCount":{"type":"integer"}}},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedScheduleOption"}}}},"DegreePlanRequirement":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["completed","in_progress","not_started"]},"grade":{"type":"string","nullable":true}}},"DegreePlanGroup":{"type":"object","properties":{"name":{"type":"string"},"completed":{"type":"integer"},"required":{"type":"integer"},"courses":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanRequirement"}}}},"DegreePlanSemesterCourse":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"credits":{"type":"number","nullable":true},"semester":{"type":"integer"},"completed":{"type":"boolean"}},"additionalProperties":true},"DegreePlanSemester":{"type":"object","properties":{"number":{"type":"integer"},"name":{"type":"string"},"totalCredits":{"type":"number"},"courses":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSemesterCourse"}}}},"DegreePlanSummarySemester":{"type":"object","properties":{"number":{"type":"integer","nullable":true},"name":{"type":"string"},"totalCredits":{"type":"number"},"courseCount":{"type":"integer"}}},"PreviouslyTakenClass":{"type":"object","properties":{"courseId":{"type":"string","description":"Rutgers base course ID like 01198111."},"title":{"type":"string"},"credits":{"type":"number","nullable":true},"grade":{"type":"string","nullable":true},"source":{"type":"string","enum":["completed_course","ap_credit","override"]}}},"AcademicSummary":{"type":"object","properties":{"totalCredits":{"type":"number"},"completedCoursesCount":{"type":"integer"},"appliedAPCreditsCount":{"type":"integer"},"pendingAPCreditsCount":{"type":"integer"},"totalAPCredits":{"type":"integer"}}},"ProfileCompletedCourse":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"credits":{"type":"number","nullable":true},"grade":{"type":"string","nullable":true}}},"ProfileAPEquivalent":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"credits":{"type":"number","nullable":true}}},"ProfileAPCredit":{"type":"object","properties":{"examId":{"type":"string"},"examName":{"type":"string"},"score":{"type":"number"},"equivalents":{"type":"array","items":{"$ref":"#/components/schemas/ProfileAPEquivalent"}}}},"ProfileDegree":{"type":"object","properties":{"degreeId":{"type":"integer","nullable":true},"name":{"type":"string"},"source":{"type":"string","enum":["profile","degree_plan"]}}},"CourseGrade":{"type":"object","properties":{"courseId":{"type":"string"},"grade":{"type":"string"},"credits":{"type":"number","nullable":true}}},"ProfileResponse":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"preferences":{"type":"object"},"degrees":{"type":"array","items":{"$ref":"#/components/schemas/ProfileDegree"}},"academicSummary":{"$ref":"#/components/schemas/AcademicSummary"},"completedCourses":{"type":"array","items":{"$ref":"#/components/schemas/ProfileCompletedCourse"}},"apCredits":{"type":"array","items":{"$ref":"#/components/schemas/ProfileAPCredit"}},"overrides":{"type":"array","items":{"type":"string"}},"courseGrades":{"type":"array","items":{"$ref":"#/components/schemas/CourseGrade"}},"previouslyTakenClasses":{"type":"array","items":{"$ref":"#/components/schemas/PreviouslyTakenClass"}}}},"MinimalAPCredit":{"type":"object","properties":{"examId":{"type":"string"},"score":{"type":"number"}}},"UpdateAcademicHistoryRequest":{"type":"object","properties":{"completedCourseBaseIds":{"type":"array","items":{"type":"string"}},"apCredits":{"type":"array","items":{"$ref":"#/components/schemas/MinimalAPCredit"}},"overrides":{"type":"array","items":{"type":"string"}},"courseGrades":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"grade":{"type":"string"},"credits":{"type":"number","nullable":true}}}}}},"UpdateAcademicHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean"},"previousClasses":{"type":"object"}}},"ResearchOpportunitySummary":{"type":"object","properties":{"id":{"oneOf":[{"type":"integer"},{"type":"string"}]},"title":{"type":"string"},"professor":{"type":"string","nullable":true},"programType":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"campus":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","nullable":true},"compensation":{"type":"string","nullable":true},"hasCompensation":{"type":"boolean"},"isConcluded":{"type":"boolean"}}},"ResearchSearchResponse":{"type":"object","properties":{"metadata":{"type":"object"},"opportunities":{"type":"array","items":{"$ref":"#/components/schemas/ResearchOpportunitySummary"}},"total":{"type":"integer"},"webFindings":{"type":"object","nullable":true}}},"CourseListSummary":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"classes":{"type":"array","items":{"type":"string"}},"is_public":{"type":"boolean","nullable":true},"is_official":{"type":"boolean","nullable":true}},"additionalProperties":true},"CourseListDetail":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"classes":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"CourseListsResponse":{"type":"object","properties":{"lists":{"type":"array","items":{"$ref":"#/components/schemas/CourseListSummary"}},"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"hasMore":{"type":"boolean"}}},"DegreePlanSummary":{"type":"object","properties":{"planId":{"type":"integer"},"name":{"type":"string"},"majorName":{"type":"string"},"school":{"type":"string"},"creditsCompleted":{"type":"integer"},"creditsRemaining":{"type":"integer"},"totalCreditsRequired":{"type":"integer"},"requirementGroups":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanGroup"}},"semesterCount":{"type":"integer"},"previouslyTakenClasses":{"type":"array","items":{"$ref":"#/components/schemas/PreviouslyTakenClass"}},"semesters":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSummarySemester"}}}},"DegreePlanDetail":{"type":"object","properties":{"planId":{"type":"integer"},"name":{"type":"string"},"major":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"targetGraduation":{"type":"string","nullable":true},"selectedDegreeIds":{"type":"array","items":{"type":"integer"}},"selectedDegrees":{"type":"array","items":{"$ref":"#/components/schemas/DegreeDetail"}},"previouslyTakenClasses":{"type":"array","items":{"$ref":"#/components/schemas/PreviouslyTakenClass"}},"semesters":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSemester"}},"updatedAt":{"type":"string","format":"date-time"}}},"CreateCourseListRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"classes":{"type":"array","items":{"type":"string"}}}},"UpdateCourseListRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"classes":{"type":"array","items":{"type":"string"}},"is_public":{"type":"boolean"}}},"SubmitFeedbackRequest":{"type":"object","required":["name","email","category","subject","message"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"category":{"type":"string","enum":["bug","feature_request","general_inquiry"]},"subject":{"type":"string"},"message":{"type":"string"}}},"FeedbackSubmission":{"type":"object","properties":{"id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"is_resolved":{"type":"boolean"}}},"SirsResponse":{"type":"object","description":"Unified SIRS search or detail response.","properties":{},"additionalProperties":true},"OpenSectionStatus":{"type":"object","properties":{"index":{"type":"string"},"isOpen":{"type":"boolean"},"lastChecked":{"type":"string","format":"date-time","nullable":true}}},"OpenSectionsResponse":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/OpenSectionStatus"}},"lastUpdated":{"type":"string","format":"date-time","nullable":true}}},"CreateScheduleRequest":{"type":"object","required":["name","termId"],"properties":{"name":{"type":"string"},"termId":{"type":"string"},"classes":{"type":"array","items":{"type":"string"},"description":"5-digit registration indexes."},"isPrimary":{"type":"boolean"}}},"CreateScheduleResponse":{"type":"object","properties":{"scheduleId":{"type":"string","format":"uuid"},"name":{"type":"string"},"termId":{"type":"string"},"resolvedCourseCount":{"type":"integer"},"unresolvedIndexes":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}}},"UpdateScheduleRequest":{"type":"object","properties":{"name":{"type":"string"},"classes":{"type":"array","items":{"type":"string"},"description":"Full replacement list of 5-digit section indexes."},"isPrimary":{"type":"boolean"}}},"UpdateScheduleResponse":{"type":"object","properties":{"message":{"type":"string"},"unresolvedIndexes":{"type":"array","items":{"type":"string"}}}},"CreateDegreePlanRequest":{"type":"object","required":["name","major"],"properties":{"name":{"type":"string"},"major":{"type":"string"},"description":{"type":"string"},"targetGraduation":{"type":"string"},"selectedDegreeIds":{"type":"array","items":{"type":"integer"}},"semesters":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSemester"}}}},"CreateDegreePlanResponse":{"type":"object","properties":{"planId":{"type":"integer"},"name":{"type":"string"},"semesterCount":{"type":"integer"},"message":{"type":"string"}}},"UpdateDegreePlanRequest":{"type":"object","properties":{"name":{"type":"string"},"major":{"type":"string"},"description":{"type":"string"},"targetGraduation":{"type":"string"},"selectedDegreeIds":{"type":"array","items":{"type":"integer"}},"semesters":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSemester"}}}},"SemesterOperation":{"type":"object","properties":{"action":{"type":"string","enum":["add_course","remove_course","move_course","add_prerequisite_chain","create_semester","delete_semester"]},"semesterNumber":{"type":"integer"},"semesterName":{"type":"string"},"fromSemesterNumber":{"type":"integer"},"fromSemesterName":{"type":"string"},"toSemesterNumber":{"type":"integer"},"toSemesterName":{"type":"string"},"courseCode":{"type":"string"},"courseName":{"type":"string"},"credits":{"type":"number"},"includeTargetCourse":{"type":"boolean"}}},"UpdateDegreePlanSemestersRequest":{"type":"object","required":["operations"],"properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/SemesterOperation"}}}},"UpdateDegreePlanSemestersResponse":{"type":"object","properties":{"planId":{"type":"integer"},"changes":{"type":"array","items":{"type":"string"}},"semesters":{"type":"array","items":{"$ref":"#/components/schemas/DegreePlanSemester"}},"message":{"type":"string"}}},"ClientRegistrationResponse":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"}}},"TokenRequest":{"type":"object","properties":{"grant_type":{"type":"string"},"code":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"redirect_uri":{"type":"string"}},"required":["grant_type","client_id","client_secret"]},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":3600},"scope":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"SuccessResponse":{"type":"object","properties":{"message":{"type":"string"}}},"CheckDegreeRequest":{"type":"object","properties":{"degreeId":{"description":"Numeric degree ID or degree name string for fuzzy lookup","oneOf":[{"type":"integer"},{"type":"string"}]},"use_saved_courses":{"type":"boolean","default":true,"description":"Auto-load completed courses from the user's profile"},"completedCourses":{"type":"array","items":{"type":"string"},"description":"Additional completed course base IDs to include"},"plannedCourses":{"type":"array","items":{"type":"string"},"description":"Course base IDs planned but not yet completed"}},"required":["degreeId"]},"PrerequisiteCheckResult":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"prerequisites":{"nullable":true},"isSatisfied":{"type":"boolean"},"satisfiedPrerequisites":{"type":"array","items":{"type":"string"}},"missingPrerequisites":{"type":"array","items":{"type":"string"}},"semester":{"type":"string"}}},"MemoriesResponse":{"type":"object","properties":{"memories":{"type":"object","additionalProperties":{"type":"string"}}}},"AddMemoryRequest":{"type":"object","properties":{"key":{"type":"string","description":"Short identifier for the memory (e.g. \"campus_preference\")"},"value":{"type":"string","description":"Value to store (e.g. \"Busch campus\")"}},"required":["key","value"]},"AddMemoryResponse":{"type":"object","properties":{"success":{"type":"boolean"},"key":{"type":"string"},"value":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}