From 3e32b6c8c4857f23e2aeaf5445e275eaed185edf Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Wed, 21 Jan 2026 16:42:57 +0000 Subject: [PATCH] no anys --- orchestrator/src/client/api/client.ts | 5 +- orchestrator/src/client/hooks/useProfile.ts | 9 +-- orchestrator/src/shared/types.ts | 63 +++++++++++++++++++++ 3 files changed, 71 insertions(+), 6 deletions(-) diff --git a/orchestrator/src/client/api/client.ts b/orchestrator/src/client/api/client.ts index 9d736b9..f60d8c6 100644 --- a/orchestrator/src/client/api/client.ts +++ b/orchestrator/src/client/api/client.ts @@ -20,6 +20,7 @@ import type { VisaSponsorSearchResponse, VisaSponsorStatusResponse, VisaSponsor, + ResumeProfile, } from '../../shared/types'; import { trackEvent } from "@/lib/analytics"; @@ -174,8 +175,8 @@ export async function getProfileProjects(): Promise return fetchApi('/profile/projects'); } -export async function getProfile(): Promise { - return fetchApi('/profile'); +export async function getProfile(): Promise { + return fetchApi('/profile'); } diff --git a/orchestrator/src/client/hooks/useProfile.ts b/orchestrator/src/client/hooks/useProfile.ts index e3ab29f..d8a4ec5 100644 --- a/orchestrator/src/client/hooks/useProfile.ts +++ b/orchestrator/src/client/hooks/useProfile.ts @@ -1,9 +1,10 @@ import { useEffect, useState } from 'react'; import * as api from '../api'; +import type { ResumeProfile } from '../../shared/types'; -let profileCache: any = null; +let profileCache: ResumeProfile | null = null; let profileError: Error | null = null; -let subscribers: Set<(profile: any | null, error: Error | null) => void> = new Set(); +let subscribers: Set<(profile: ResumeProfile | null, error: Error | null) => void> = new Set(); let isFetching = false; /** @@ -11,7 +12,7 @@ let isFetching = false; * Caches the result to avoid re-fetching. */ export function useProfile() { - const [profile, setProfile] = useState(profileCache); + const [profile, setProfile] = useState(profileCache); const [error, setError] = useState(profileError); useEffect(() => { @@ -22,7 +23,7 @@ export function useProfile() { setError(profileError); } - const handleUpdate = (newProfile: any | null, newError: Error | null) => { + const handleUpdate = (newProfile: ResumeProfile | null, newError: Error | null) => { setProfile(newProfile); setError(newError); }; diff --git a/orchestrator/src/shared/types.ts b/orchestrator/src/shared/types.ts index e134aa4..d59c27f 100644 --- a/orchestrator/src/shared/types.ts +++ b/orchestrator/src/shared/types.ts @@ -268,6 +268,69 @@ export interface ResumeProjectsSettings { aiSelectableProjectIds: string[]; } +export interface ResumeProfile { + basics?: { + name?: string; + label?: string; + image?: string; + email?: string; + phone?: string; + url?: string; + summary?: string; + headline?: string; + location?: { + address?: string; + postalCode?: string; + city?: string; + countryCode?: string; + region?: string; + }; + profiles?: Array<{ + network?: string; + username?: string; + url?: string; + }>; + }; + sections?: { + summary?: { + id?: string; + visible?: boolean; + name?: string; + content?: string; + }; + skills?: { + id?: string; + visible?: boolean; + name?: string; + items?: Array<{ + id: string; + name: string; + description: string; + level: number; + keywords: string[]; + visible: boolean; + }>; + }; + projects?: { + id?: string; + visible?: boolean; + name?: string; + items?: Array<{ + id: string; + name: string; + description: string; + date: string; + summary: string; + visible: boolean; + keywords?: string[]; + url?: string; + }>; + }; + [key: string]: any; + }; + [key: string]: any; +} + export interface AppSettings { model: string; defaultModel: string;