Types Reference
Shared TypeScript types and interfaces used across the landing page.
courses.ts
Testimonial
export type Testimonial = {
en: string;
id: string;
author: string;
role_en: string;
role_id: string;
avatarPalette?: string;
avatarSrc?: string;
};| Field | Type | Required | Description |
|---|---|---|---|
en | string | Yes | TODO |
id | string | Yes | TODO |
author | string | Yes | TODO |
role_en | string | Yes | TODO |
role_id | string | Yes | TODO |
avatarPalette | string | No | TODO |
avatarSrc | string | No | TODO |
SyllabusItem
export type SyllabusItem = {
mod: number;
free: boolean;
title_en: string;
title_id: string;
min: number;
};| Field | Type | Required | Description |
|---|---|---|---|
mod | number | Yes | TODO |
free | boolean | Yes | TODO |
title_en | string | Yes | TODO |
title_id | string | Yes | TODO |
min | number | Yes | TODO |
Course
export type Course = {
id: string;
titleKey?: string;
title_en?: string;
title_id?: string;
bodyKey?: string;
body_en?: string;
body_id?: string;
moduleCount: number;
readHours: number;
coverKey: 'workflow' | 'chat' | 'evals';
syllabus: SyllabusItem[];
available: boolean;
rating?: number;
reviewCount?: number;
completion?: number;
badge_en?: string;
badge_id?: string;
testimonial?: Testimonial;
testimonials?: Testimonial[];
};| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | TODO |
titleKey | string | No | TODO |
title_en | string | No | TODO |
title_id | string | No | TODO |
bodyKey | string | No | TODO |
body_en | string | No | TODO |
body_id | string | No | TODO |
moduleCount | number | Yes | TODO |
readHours | number | Yes | TODO |
coverKey | `‘workflow' | 'chat' | 'evals’` |
syllabus | SyllabusItem[] | Yes | TODO |
available | boolean | Yes | TODO |
rating | number | No | TODO |
reviewCount | number | No | TODO |
completion | number | No | TODO |
badge_en | string | No | TODO |
badge_id | string | No | TODO |
testimonial | Testimonial | No | TODO |
testimonials | Testimonial[] | No | TODO |
ui-store.ts
UIState
interface UIState {
theme: Theme;
mobileMenuOpen: boolean;
setTheme: (theme: Theme) => void;
toggleMobileMenu: () => void;
}| Field | Type | Required | Description |
|---|---|---|---|
theme | Theme | Yes | TODO |
mobileMenuOpen | boolean | Yes | TODO |
setTheme | (theme: Theme) =\> void | Yes | TODO |
toggleMobileMenu | () =\> void | Yes | TODO |
Theme
export type Theme = 'light' | 'dark';contact.ts
ContactFormData
export type ContactFormData = z.infer<typeof contactSchema>;