export interface ApiKeyExchangeOptions { apiKey: string; envId: string; /** 地域,默认 ap-shanghai */ region?: string; /** 请求超时时间,默认 15000ms */ timeout?: number; /** HTTP 代理 */ proxy?: string; /** 自定义 endpoint,覆盖默认的 https://..tcb-api.tencentcloudapi.com */ endpoint?: string; } export interface ApiKeyCredentialResult { secretId: string; secretKey: string; token: string; /** 临时密钥过期时间(毫秒时间戳) */ accessTokenExpired: number; envId: string; } /** * 用 CloudBase API Key 换取临时 STS 密钥 * * 调用 qbase-service 的 /capi/credential 端点: * POST https://..tcb-api.tencentcloudapi.com/capi/credential * Authorization: Bearer * Body: { "env": "" } * * 返回: { code: 0, data: { TmpSecretId, TmpSecretKey, Token, ExpiredTime } } */ export declare function exchangeApiKeyForCredential(options: ApiKeyExchangeOptions): Promise;