Files
RepoHub/src/types/index.ts
T
Yusuf İpek 08f35aedbc feat: add multiple package sync sources and API integration
- Added undici dependency and implemented three package fetcher variants (simple text parsing, v2 with better error handling, and official repository sync)
- Integrated real API calls in PlatformSelector and PackageBrowser components with fallback to mock data
- Extended sync API route to support multiple data sources (debian-simple, ubuntu-simple, debian-official-v2, etc.) with platform initialization
2025-11-10 19:12:46 +03:00

49 lines
937 B
TypeScript

export interface Platform {
id: string
name: string
packageManager: string
icon: string
description?: string
}
export interface Package {
id: string
name: string
description: string
version: string
category?: string
license?: string
type: 'gui' | 'cli'
platform?: string | Platform
platform_id?: string
repository: 'official' | 'third-party'
lastUpdated?: string
downloads?: number
popularity?: number
popularity_score?: number
tags?: string[]
}
export interface FilterOptions {
platform_id?: string
category_id?: number
type?: 'gui' | 'cli'
repository?: 'official' | 'third-party'
search?: string
limit?: number
offset?: number
sort_by?: string
sort_order?: 'asc' | 'desc'
}
export interface SelectedPackage extends Package {
selectedAt: string
}
export interface GeneratedScript {
platform: string
script: string
packages: SelectedPackage[]
generatedAt: string
}