import type { JWT, OAuth2Client } from 'google-auth-library'; export interface ServiceAccountKey { type?: string; client_email?: string; private_key?: string; project_id?: string; } /** 서비스 계정 키 JSON 문자열을 검증 후 저장. 형식이 아니면 throw. */ export declare function saveBigQueryServiceAccountJson(json: string): ServiceAccountKey; /** 저장된 BigQuery 서비스 계정 키. 없거나 형식 오류면 null. */ export declare function getBigQueryServiceAccountKey(): ServiceAccountKey | null; /** 저장된 BigQuery 서비스 계정 키 삭제. 없으면 false. */ export declare function deleteBigQueryServiceAccountJson(): boolean; export type BigQueryAuthSource = 'service-account' | 'user-oauth'; export interface BigQueryAuth { client: OAuth2Client | JWT; source: BigQueryAuthSource; /** 서비스 계정이면 client_email, 사용자 OAuth면 null. */ clientEmail: string | null; /** 서비스 계정 키의 project_id (있으면). */ projectId: string | null; } /** * BigQuery 인증 클라이언트 해석. 우선순위: * 1. BigQuery 서비스 계정 (~/.mimi-seed/bigquery-service-account.json) * 2. 사용자 OAuth (~/.mimi-seed/tokens.json) * 둘 다 없으면 null. */ export declare function resolveBigQueryAuth(): BigQueryAuth | null; /** BigQuery 인증을 강제. 없으면 안내 메시지와 함께 throw. */ export declare function requireBigQueryAuth(): BigQueryAuth;