TypeScript Definitions
This reference documents the TypeScript interfaces exported by@/engine.
Core Configuration Interfaces
export interface SavedConfiguration {
version: number
githubId: number
username: string
profileSlug: string
profileName: string
templateId: string
widgets: WidgetInstance[]
globalStyles: GlobalStyles
metadata: {
createdAt: string
updatedAt: string
schemaVersion: number
generatedBy?: 'manual' | 'auto'
}
}
export interface WidgetInstance {
instanceId: string
widgetId: string
name?: string
position: { x: number; y: number }
size: { width: number; height: number }
config: Record<string, unknown>
locked: boolean
visible: boolean
zIndex: number
}
export interface GlobalStyles {
backgroundColor: string
transparentBackground?: boolean
textColor: string
accentColor: string
borderColor: string
fontFamily: string
borderRadius: number
padding: number
themeMode: 'dark' | 'light' | 'auto'
templateStyle?: string
}
export interface RenderOptions {
theme?: 'dark' | 'light'
width?: number
height?: number
widgets?: string[]
}
Normalized GitHub Data Interfaces
export interface NormalizedGitHubData {
user: GitHubUser
repos: GitHubRepo[]
languages: Record<string, number>
totalStars: number
totalForks: number
readmeContent?: string | null
socialAccounts?: GitHubSocialAccount[]
contributions: {
totalContributions: number
weeks: ContributionWeek[]
}
}
export interface GitHubUser {
id: number
login: string
name: string | null
avatar_url: string
bio: string | null
company: string | null
blog: string | null
location: string | null
email: string | null
twitter_username: string | null
public_repos: number
public_gists: number
followers: number
following: number
created_at: string
updated_at: string
}
export interface GitHubRepo {
id: number
name: string
description: string | null
stargazers_count: number
forks_count: number
language: string | null
html_url: string
fork: boolean
updated_at: string
}
export interface ContributionDay {
contributionCount: number
date: string
color: string
}
export interface ContributionWeek {
contributionDays: ContributionDay[]
}