mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 10:36:07 +00:00
- 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
49 lines
937 B
TypeScript
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
|
|
}
|