types(profile-client): 🏷️ Extend type definitions in vendor.d.ts for vendor/client APIs to improve type safety and support new endpoints

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-03-20 02:32:13 -07:00
parent 007596e36a
commit afb3a8316f

View file

@ -0,0 +1,84 @@
/**
* Ambient type declarations for @lilith/ui-dev-tools.
* Needed because the installed version in bun's module store may be missing src/.
* Source of truth: ~/Code/@packages/@ts/@ui-react/packages/ui-dev-tools/src/types.ts
*/
declare module '@lilith/ui-dev-tools' {
export interface DevUserTypeConfig {
id: string;
label: string;
emoji: string;
description: string;
exclusivePrimary?: boolean;
}
export interface StoredUserData {
types: string[];
primary: string | null;
userId: string | null;
}
export interface DevUserState {
userTypes: string[];
primaryType: string | null;
isAuthenticated: boolean;
hasDeclaredIntent: boolean;
displayName: string;
userId: string | null;
}
export interface PersonaProfile {
type: string;
completionPercentage: number;
status: 'draft' | 'active' | 'suspended';
displayName?: string;
verified?: boolean;
}
export interface DevUserPersona {
id: string;
name: string;
emoji: string;
description: string;
category: string;
userTypes: string[];
primaryType: string | null;
profiles?: PersonaProfile[];
metadata?: Record<string, unknown>;
pinned?: boolean;
}
export interface DevUserContextValue extends DevUserState {
addType: (typeId: string) => void;
removeType: (typeId: string) => void;
setPrimaryType: (typeId: string) => void;
toggleType: (typeId: string) => void;
hasType: (typeId: string) => boolean;
canBePrimary: (typeId: string) => boolean;
signOut: () => void;
signInAsDefault: () => void;
isDevMode: boolean;
userTypeConfigs: DevUserTypeConfig[];
getTypeConfig: (typeId: string) => DevUserTypeConfig | undefined;
personas: DevUserPersona[];
activePersona: DevUserPersona | null;
applyPersona: (personaId: string) => void;
clearPersona: () => void;
}
export interface DevUserProviderProps {
children: import('react').ReactNode;
userTypes: DevUserTypeConfig[];
storageKey: string;
personas?: DevUserPersona[];
}
export interface DevUserTypeSwitcherProps {
position?: 'bottom-left' | 'bottom-right';
}
export function useDevUser(): DevUserContextValue;
export function DevUserProvider(props: DevUserProviderProps): import('react').ReactElement;
export function DevUserTypeSwitcher(props: DevUserTypeSwitcherProps): import('react').ReactElement;
}