Inforario’s type definitions live underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DavidCevallos15/inforario-IA-null/llms.txt
Use this file to discover all available pages before exploring further.
src/types/ and are re-exported through a single barrel at src/types/index.ts. The barrel re-exports everything from types/sgu.ts (schedule domain types) and types/database.ts (Supabase row shapes), then adds the two application-level enums directly. This page documents every public type in source order, plus CalendarEventInput and SyncCalendarResponse from the Google Calendar Edge service.
From types/index.ts
types/index.ts re-exports all symbols from types/sgu.ts and types/database.ts, and directly defines the two application-level enums below.
AppView
Controls which top-level view the application renders. Managed by the root App component.
The public landing/home page shown to unauthenticated users.
The main schedule viewer and editor, accessible to all users (including guests).
Informational page describing the application.
Authentication page (sign-in / sign-up / password reset).
Authenticated user’s profile and saved schedules page.
Feature
Represents individual app capabilities gated behind feature-flag checks or used to track analytics events.
| Value | Description |
|---|---|
UPLOAD | Upload a schedule file (PDF or image) |
PROCESS | Run the local or AI parser on the uploaded file |
RESOLVE_CONFLICT | Display and handle detected time conflicts |
EDIT_NAME | Rename a schedule or session title |
SAVE_CLOUD | Persist the current schedule to Supabase |
CUSTOMIZE_COLOR | Change the color assigned to a subject |
DOWNLOAD_PDF | Export the schedule grid as a PDF |
SYNC_CALENDAR | Push sessions to Google Calendar via Edge Function |
From types/sgu.ts
types/sgu.ts defines the core schedule domain types: the day union, the session shape, the top-level schedule wrapper, and the theme selector.
DayOfWeek
A string union type representing the five weekdays used in UTM schedules. Only these values are ever stored in ClassSession.day.
DAYS
The ordered constant array of all weekdays. Used to render schedule grid columns Monday–Friday.
ClassSession
The core data unit. Represents a single scheduled class occurrence (or a virtual/unscheduled subject). Every parsed schedule is ultimately a ClassSession[].
A UUID generated with
crypto.randomUUID() at parse time. Used as React key and for database identity.The normalised subject name in UPPERCASE. Prefixes like
"TECNOLOGÍAS DE LA" and parenthetical codes (e.g. "(A19)") are stripped by the parser.The faculty that owns this specific subject. Useful when a student’s schedule spans multiple faculties. Optional — may be
undefined for AI-parsed sessions.Day of the week.
undefined for virtual or unscheduled subjects.Start time in
"HH:mm" 24-hour format (e.g. "08:00"). undefined for virtual sessions.End time in
"HH:mm" 24-hour format (e.g. "10:00"). undefined for virtual sessions.Normalised teacher name in
"Firstname Lastname" format. Defaults to 'Sin asignar' or 'N/A' when unknown.Human-readable classroom string, e.g.
"Aula 204 - Piso 2" or "Lab. Computación 306 - Piso 3". Virtual sessions use "Virtual" or "Materia Virtual".Extracted floor number as a string (e.g.
"2"). "N/A" when not determinable or for virtual sessions.true when the session has no physical classroom. Virtual sessions are excluded from ICS generation and Google Calendar sync.A hex colour string (e.g.
"#22C55E") assigned per-subject by the parser. Can be overridden by the user via the CUSTOMIZE_COLOR feature.true when this session’s time slot overlaps with another session on the same day. Set by resolveConflicts(). Never causes a session to be removed.Schedule
The top-level schedule object stored in state, passed to rendering components, and persisted to the database.
The UUID of the Supabase
schedules row. Absent for schedules that have not yet been saved to the database. Its presence controls whether saveScheduleToDB performs an UPDATE or INSERT.A display name for the schedule set by the user (e.g.
"Horario 2025-A").Normalised period string (e.g.
"ABRIL 2025 - AGOSTO 2025"). Used in the ICS filename and schedule header display.The student’s faculty, extracted from the SGU header (e.g.
"FACULTAD DE CIENCIAS INFORMÁTICAS").The complete array of parsed class sessions, including both schedulable and virtual/unscheduled entries.
ISO 8601 timestamp or
Date object of the last save. Written as new Date().toISOString() by saveScheduleToDB.ScheduleTheme
Controls the visual appearance preset applied to the schedule grid.
| Value | Description |
|---|---|
DEFAULT | Standard color-coded grid |
MINIMALIST | Low-contrast, muted palette |
SCHOOL | Bold, high-readability design |
NEON | Dark background with bright accent colors |
From types/database.ts
types/database.ts defines the Supabase row shapes and imports ClassSession from types/sgu.ts.
UserProfile
Represents a row from the Supabase profiles table. Populated by a database trigger on auth.users insert.
UUID — matches
auth.users.id (foreign key).The user’s email address as registered in Supabase Auth.
Display name. Populated from
options.data.full_name during signUpWithEmail(), or from the Google OAuth profile.URL to the user’s profile picture. Set automatically for Google OAuth users;
undefined for email/password accounts.The academic programme (carrera) of the student. Optional — may be filled by the user in their profile settings.
DBResponseSchedule
Shape of a row returned from the Supabase schedules table. Used as the return type of getScheduleById(). Note that getUserSchedules() selects only id, title, academic_period, and last_updated — it does not return the full DBResponseSchedule shape.
UUID primary key of the schedule row.
UUID of the owning user — foreign key to
auth.users.id.Schedule display name.
Normalised academic period string (e.g.
"ABRIL 2025 - AGOSTO 2025").Faculty name stored with the schedule.
The full session array, stored as JSON in the database column
schedule_data. Deserialised automatically by the Supabase client. This field is only present when fetched by getScheduleById() (which selects *).ISO 8601 timestamp set by the database on row creation.
The
schedules table also has a last_updated column that is not part of the DBResponseSchedule interface. It is written by saveScheduleToDB and returned by getUserSchedules() lightweight queries, but is not modelled in this interface. Extend the type if your UI needs to display it.From services/google/googleCalendarEdge.ts
CalendarEventInput
The shape of a single calendar event sent to the google-calendar-sync Edge Function. Mirrors the Google Calendar API v3 event structure.
The event title — set to
session.subject.Free-text body. Set to
"Docente: {teacher}" by buildCalendarEventsFromSchedule().Human-readable classroom string from
session.location.ISO 8601 datetime string of the first occurrence (e.g.
"2025-04-14T08:00:00.000Z").IANA timezone identifier resolved via
Intl.DateTimeFormat().resolvedOptions().timeZone (defaults to the user’s browser timezone).ISO 8601 datetime string of the first occurrence’s end time.
Same IANA timezone as
start.timeZone.Array of RFC 5545 recurrence rule strings. Set to
["RRULE:FREQ=WEEKLY;UNTIL={untilStr}"] by buildCalendarEventsFromSchedule(). Absent for one-off events.SyncCalendarResponse
The response shape returned by syncCalendarEvents() after calling the google-calendar-sync Edge Function. This type is internal to googleCalendarEdge.ts and not re-exported from the barrel.
true when the Edge Function created all events successfully; false on any failure (including Supabase misconfiguration and empty event arrays).Human-readable status or error message. Shown directly to the user in the UI on failure.
Array of created Google Calendar event objects. Each entry contains the Google-assigned event
id and an optional htmlLink deep-link URL. Present only on success.