// u6u-credentials Worker 型別定義 export type Bindings = { CREDENTIALS_KV: KVNamespace; ENCRYPTION_KEY: string; // hex-encoded 256-bit AES key(wrangler secret) ENVIRONMENT: string; }; export interface CredentialRecord { id: string; // 用 name slugify 生成 name: string; // 用戶命名(human-readable) type: string; // api_key / bearer_token / google_oauth / telegram_bot_token / ... encrypted_secret: string; // AES-GCM base64 encrypted iv: string; // base64 IV created_at: number; } // 對外回傳(不含 secret) export interface CredentialSummary { id: string; name: string; type: string; created_at: number; }