@@ -111,22 +111,25 @@ export const ZUpsertProgramWithRequirements = z.object({
111111 z . discriminatedUnion ( "type" , [
112112 z . object ( {
113113 isMajor : z . boolean ( ) ,
114+ description : z . optional ( z . string ( ) ) ,
114115 type : z . literal ( "required" ) ,
115116 courses : z . array ( z . string ( ) ) ,
116117 } ) ,
117118 z . object ( {
118119 isMajor : z . boolean ( ) ,
120+ description : z . optional ( z . string ( ) ) ,
119121 type : z . literal ( "alternative" ) ,
120122 courses : z . array ( z . string ( ) ) ,
121123 } ) ,
122124 z . object ( {
123125 isMajor : z . boolean ( ) ,
126+ description : z . optional ( z . string ( ) ) ,
124127 type : z . literal ( "options" ) ,
125128 courses : z . array ( z . string ( ) ) ,
126129 courseLevels : z . array (
127130 z . object ( {
128- program : z . string ( ) ,
129- level : z . coerce . number ( ) ,
131+ program : z . string ( ) , // CSCI-UA
132+ level : z . coerce . number ( ) , // 4
130133 } ) ,
131134 ) ,
132135 creditsRequired : z . number ( ) ,
@@ -143,6 +146,7 @@ export const ZUpsertRequirements = z.array(
143146 z . transform ( ( val ) => val as Id < "programs" > ) ,
144147 ) ,
145148 isMajor : z . boolean ( ) ,
149+ description : z . optional ( z . string ( ) ) ,
146150 type : z . literal ( "required" ) ,
147151 courses : z . array ( z . string ( ) ) ,
148152 } ) ,
@@ -152,6 +156,7 @@ export const ZUpsertRequirements = z.array(
152156 z . transform ( ( val ) => val as Id < "programs" > ) ,
153157 ) ,
154158 isMajor : z . boolean ( ) ,
159+ description : z . optional ( z . string ( ) ) ,
155160 type : z . literal ( "alternative" ) ,
156161 courses : z . array ( z . string ( ) ) ,
157162 } ) ,
@@ -161,6 +166,7 @@ export const ZUpsertRequirements = z.array(
161166 z . transform ( ( val ) => val as Id < "programs" > ) ,
162167 ) ,
163168 isMajor : z . boolean ( ) ,
169+ description : z . optional ( z . string ( ) ) ,
164170 type : z . literal ( "options" ) ,
165171 courses : z . array ( z . string ( ) ) ,
166172 courseLevels : z . array (
@@ -206,14 +212,17 @@ export const ZUpsertPrerequisites = z.array(
206212
207213export const ZUpsertCourseOfferings = z . array (
208214 z . object ( {
209- courseCode : z . string ( ) ,
210- classNumber : z . number ( ) ,
211- title : z . string ( ) ,
215+ courseCode : z . string ( ) , // CSCI-UA 102
216+ classNumber : z . number ( ) , // 10349
217+ title : z . optional ( z . string ( ) ) ,
212218 section : z . string ( ) ,
213- year : z . number ( ) ,
219+ description : z . optional ( z . string ( ) ) ,
220+ year : z . number ( ) , // 2025
214221 term : z . enum ( [ "spring" , "summer" , "fall" , "j-term" ] ) ,
222+ level : z . enum ( [ "undergraduate" , "graduate" ] ) ,
223+ school : ZSchoolName ,
215224 instructor : z . array ( z . string ( ) ) ,
216- location : z . string ( ) ,
225+ location : z . optional ( z . string ( ) ) ,
217226 days : z . array (
218227 z . enum ( [
219228 "monday" ,
@@ -225,8 +234,8 @@ export const ZUpsertCourseOfferings = z.array(
225234 "sunday" ,
226235 ] ) ,
227236 ) ,
228- startTime : z . string ( ) ,
229- endTime : z . string ( ) ,
237+ startTime : z . string ( ) , // 13:00
238+ endTime : z . string ( ) , // 14:15
230239 status : z . enum ( [ "open" , "closed" , "waitlist" ] ) ,
231240 waitlistNum : z . optional ( z . number ( ) ) ,
232241 isCorequisite : z . _default ( z . boolean ( ) , false ) ,
0 commit comments