best / frontend /src /types /api.ts
anky2002's picture
feat: Complete project scaffold - backend (FastAPI) + frontend (Next.js 15) + scraper + LLM gateway
8f2ab79 verified
Raw
History Blame Contribute Delete
3.21 kB
// Auth
export interface LoginRequest {
email: string;
password: string;
}
export interface RegisterRequest {
email: string;
password: string;
full_name: string;
}
export interface TokenResponse {
access_token: string;
refresh_token: string;
token_type: string;
}
export interface UserResponse {
id: string;
email: string;
full_name: string;
avatar_url: string | null;
role: string;
is_verified: boolean;
}
// Jobs
export interface JobSearchParams {
q?: string;
location?: string;
remote?: string;
employment_type?: string;
seniority?: string;
salary_min?: number;
company?: string;
skills?: string;
visa_sponsorship?: boolean;
posted_within_hours?: number;
page?: number;
page_size?: number;
sort_by?: "relevance" | "date" | "salary";
}
export interface JobLocation {
city?: string;
state?: string;
country?: string;
raw?: string;
}
export interface JobListItem {
id: string;
title: string;
company_name: string;
company_logo_url?: string;
locations?: JobLocation[];
remote_type?: string;
employment_type?: string;
seniority_level?: string;
salary_min?: number;
salary_max?: number;
salary_currency?: string;
date_posted?: string;
source_url: string;
is_saved: boolean;
}
export interface JobDetail extends JobListItem {
description_html?: string;
description_text?: string;
requirements?: string[];
skills_required?: string[];
skills_preferred?: string[];
benefits?: string[];
visa_sponsorship?: boolean;
experience_years_min?: number;
experience_years_max?: number;
apply_url?: string;
company_domain?: string;
company_size?: string;
company_industry?: string;
}
export interface JobSearchResponse {
jobs: JobListItem[];
total: number;
page: number;
page_size: number;
has_more: boolean;
}
// Applications
export type ApplicationStatus =
| "wishlist"
| "applying"
| "applied"
| "screening"
| "interviewing"
| "offer"
| "accepted"
| "rejected"
| "withdrawn"
| "ghosted";
export interface Application {
id: string;
job_id?: string;
custom_job_title?: string;
custom_company_name?: string;
custom_job_url?: string;
status: ApplicationStatus;
priority: number;
applied_at?: string;
response_at?: string;
notes?: string;
tags?: string[];
created_at: string;
updated_at: string;
}
export interface KanbanResponse {
columns: Record<ApplicationStatus, Application[]>;
total: number;
}
// AI
export interface ResumeReviewResponse {
score: number;
strengths: string[];
weaknesses: string[];
ats_issues: string[];
missing_keywords: string[];
rewrite_suggestions: Array<{
section: string;
original: string;
suggestion: string;
}>;
overall_feedback: string;
}
export interface JobMatchResponse {
match_score: number;
requirements_met: string[];
requirements_missing: string[];
skills_gap: string[];
strengths_for_role: string[];
risks: string[];
recommendation: string;
}
// LLM Providers
export interface LLMModel {
id: string;
name: string;
}
export interface LLMProvider {
name: string;
display_name: string;
is_local: boolean;
is_available: boolean;
models: LLMModel[];
}