Skip to content

Commit ea74b1a

Browse files
committed
refactor(server): cleanup unused schemas
1 parent 88a407f commit ea74b1a

File tree

1 file changed

+0
-72
lines changed

1 file changed

+0
-72
lines changed

packages/server/convex/http.ts

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -139,78 +139,6 @@ export const ZUpsertProgramWithRequirements = z.object({
139139
),
140140
});
141141

142-
export const ZUpsertRequirements = z.array(
143-
z.discriminatedUnion("type", [
144-
z.object({
145-
programId: z.pipe(
146-
z.string(),
147-
z.transform((val) => val as Id<"programs">),
148-
),
149-
isMajor: z.boolean(),
150-
description: z.optional(z.string()),
151-
type: z.literal("required"),
152-
courses: z.array(z.string()),
153-
}),
154-
z.object({
155-
programId: z.pipe(
156-
z.string(),
157-
z.transform((val) => val as Id<"programs">),
158-
),
159-
isMajor: z.boolean(),
160-
description: z.optional(z.string()),
161-
type: z.literal("alternative"),
162-
courses: z.array(z.string()),
163-
}),
164-
z.object({
165-
programId: z.pipe(
166-
z.string(),
167-
z.transform((val) => val as Id<"programs">),
168-
),
169-
isMajor: z.boolean(),
170-
description: z.optional(z.string()),
171-
type: z.literal("options"),
172-
courses: z.array(z.string()),
173-
courseLevels: z.array(
174-
z.object({
175-
program: z.string(),
176-
level: z.coerce.number(),
177-
}),
178-
),
179-
creditsRequired: z.number(),
180-
}),
181-
]),
182-
);
183-
184-
export const ZUpsertPrerequisites = z.array(
185-
z.discriminatedUnion("type", [
186-
z.object({
187-
courseId: z.pipe(
188-
z.string(),
189-
z.transform((val) => val as Id<"courses">),
190-
),
191-
type: z.literal("required"),
192-
courses: z.array(z.string()),
193-
}),
194-
z.object({
195-
courseId: z.pipe(
196-
z.string(),
197-
z.transform((val) => val as Id<"courses">),
198-
),
199-
type: z.literal("alternative"),
200-
courses: z.array(z.string()),
201-
}),
202-
z.object({
203-
courseId: z.pipe(
204-
z.string(),
205-
z.transform((val) => val as Id<"courses">),
206-
),
207-
type: z.literal("options"),
208-
courses: z.array(z.string()),
209-
creditsRequired: z.number(),
210-
}),
211-
]),
212-
);
213-
214142
export const ZUpsertCourseOfferings = z.array(
215143
z.object({
216144
courseCode: z.string(), // CSCI-UA 102

0 commit comments

Comments
 (0)