import type { JWT } from 'google-auth-library'; import type { ServiceAccountKey } from './bigquery-auth.js'; export declare const DRIVE_SA_PATH: string; export declare const DRIVE_SA_ENV = "MIMI_SEED_DRIVE_SA_JSON"; /** 서비스 계정은 공유받은 범위 안에서만 보이므로 전체 drive 스코프를 쓴다. */ export declare const DRIVE_SA_SCOPES: string[]; export type DriveAuthSource = 'service-account-env' | 'service-account' | 'user-oauth'; /** JSON 문자열 → 서비스 계정 키. 형식이 아니면 throw (메시지에 키 본문을 싣지 않는다). */ export declare function parseDriveServiceAccountJson(json: string): ServiceAccountKey; /** 검증 후 ~/.mimi-seed/drive-service-account.json 에 0600 원자적 저장. */ export declare function saveDriveServiceAccountJson(json: string): ServiceAccountKey; /** 저장된 Drive 서비스 계정 키 삭제. 없으면 false. */ export declare function deleteDriveServiceAccountJson(): boolean; export interface DriveServiceAccount { key: ServiceAccountKey; source: Exclude; } /** * 설정된 Drive 서비스 계정. 환경 변수가 있으면 그것이 이긴다. * 환경 변수가 있는데 형식이 틀리면 조용히 파일로 넘어가지 않고 throw — 잘못된 키를 쓰는 줄 * 모른 채 다른 계정으로 올라가는 일을 막는다. */ export declare function getDriveServiceAccount(env?: NodeJS.ProcessEnv): DriveServiceAccount | null; /** 서비스 계정 키 → Drive 스코프 JWT 클라이언트. */ export declare function driveJwt(key: ServiceAccountKey): JWT; export declare const DRIVE_AUTH_HINT: string;