export type AssetType = 'domain' | 'ssl' | 'vps' | 'api_credit' | 'cdn_credit'; export type AssetProviderId = 'cloudflare' | 'godaddy' | 'namecheap' | 'ssl_labs' | 'hetzner' | 'digitalocean' | 'vultr' | 'aliyun_ecs' | 'tencent_cvm'; export interface AssetExpiry { asset_type: AssetType; /** 资源标识 (domain name / cert fingerprint / vps id) */ identifier: string; /** 显示名 (e.g. example.com / vps "web-prod-01") */ display_name: string; /** ISO 8601 到期时间 (null = 不到期 / 未知) */ expires_at: string | null; /** 距离到期天数 (负数 = 已过期, null = 未知) */ days_left: number | null; /** 提供商 */ provider: AssetProviderId; /** 余额 (VPS / API credit), 单位 USD */ balance_usd?: number; /** 状态描述 (e.g. "active" / "expiring_soon" / "expired" / "renewed") */ status?: string; /** 原始响应 (调试用, 生产可省) */ raw?: unknown; } export interface FetchAssetsOptions { /** 最多返回条数 */ limit?: number; /** 仅查询 X 天内到期的 (省 API call) */ expiring_within_days?: number; } export interface AssetConnector { id: AssetProviderId; name: string; is_real: boolean; /** 拉资产时效列表 — 调用瞬间 BYOK key 注入,函数 scope 结束 GC */ fetchAssets(byok_key: string, opts?: FetchAssetsOptions): Promise; /** 验 key 有效性 */ ping(byok_key: string): Promise<{ ok: boolean; error?: string; key_fingerprint?: string; }>; } /** 计算距离到期天数 */ export declare function daysUntil(iso: string | null): number | null; /** 状态归类 */ export declare function classifyStatus(days_left: number | null): string; //# sourceMappingURL=types.d.ts.map