UNPKG

recoder-code

Version:

🚀 AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

48 lines (47 loc) • 1.24 kB
/** * Download Entity * Tracks package downloads for analytics and statistics */ import { Package } from './Package'; import { PackageVersion } from './PackageVersion'; import { User } from './User'; export declare class Download { id: string; ip_address: string; user_agent?: string; country?: string; city?: string; referer?: string; download_method?: string; client_version?: string; node_version?: string; os?: string; arch?: string; is_ci: boolean; ci_name?: string; is_bot: boolean; project_name?: string; install_reason?: string; date: Date; date_only: string; package: Package; package_id: string; version: PackageVersion; version_id: string; user?: User; user_id?: string; static fromRequest(req: any, packageInfo: { package_id: string; version_id: string; user_id?: string; }): Partial<Download>; private static detectDownloadMethod; private static extractClientVersion; private static extractNodeVersion; private static extractOS; private static extractArch; private static isCI; private static extractCIName; private static isBot; toAnalyticsFormat(): any; }