import type { OAuth2Client } from 'google-auth-library'; /** * Firebase Management API + Cloud Resource Manager 래퍼 */ export declare function listProjects(auth: OAuth2Client): Promise<{ projectId: string | null | undefined; displayName: string | null | undefined; state: string | null | undefined; projectNumber: string | null | undefined; }[]>; export declare function getProject(auth: OAuth2Client, projectId: string): Promise; /** long-running Operation 하나의 완료 여부를 판정한다. 폴링 루프에서 재사용 + 단독 테스트 가능. */ export declare function operationOutcome(op: { done?: boolean | null; error?: { message?: string | null; } | null; }): { status: 'pending'; } | { status: 'done'; } | { status: 'error'; message: string; }; /** * getOperation()을 완료(done)까지 폴링한다. getOperation() 자체가 튕기는 것(네트워크 blip)과 * operation이 아직 안 끝난 것(pending)을 구분해서, 전자는 몇 번 더 참아주고 후자만 진행 신호로 본다. * intervalMs/maxAttempts는 테스트에서 실시간 대기 없이 검증하기 위한 override. */ export declare function waitForOperation(getOperation: () => Promise<{ done?: boolean | null; error?: { message?: string | null; } | null; }>, label: string, opts?: { intervalMs?: number; maxAttempts?: number; }): Promise; /** * 새 GCP 프로젝트를 만들고 Firebase를 추가한다 (앱 하나당 전용 Firebase 프로젝트 컨벤션). * 둘 다 long-running operation이라 완료까지 폴링한다(최악 케이스 ~2분: 단계당 ~60s × 2단계). * parent 생략 시 계정의 기본 정책대로 생성된다 — 조직 소속이 강제된 계정은 parent * ('organizations/' 또는 'folders/') 없이 호출하면 에러가 난다. */ export declare function createProject(auth: OAuth2Client, projectId: string, displayName: string, opts?: { parent?: string; }): Promise; export declare function listAndroidApps(auth: OAuth2Client, projectId: string): Promise<{ appId: string | null | undefined; packageName: string | null | undefined; displayName: string | null | undefined; state: string | null | undefined; }[]>; export declare function createAndroidApp(auth: OAuth2Client, projectId: string, packageName: string, displayName: string): Promise; export declare function getAndroidConfig(auth: OAuth2Client, projectId: string, appId: string): Promise<{ filename: string | null | undefined; content: string | null; }>; export declare function deleteAndroidApp(auth: OAuth2Client, projectId: string, appId: string): Promise; export declare function listIosApps(auth: OAuth2Client, projectId: string): Promise<{ appId: string | null | undefined; bundleId: string | null | undefined; displayName: string | null | undefined; state: string | null | undefined; }[]>; export declare function createIosApp(auth: OAuth2Client, projectId: string, bundleId: string, displayName: string): Promise; export declare function getIosConfig(auth: OAuth2Client, projectId: string, appId: string): Promise<{ filename: string | null | undefined; content: string | null; }>; export declare function deleteIosApp(auth: OAuth2Client, projectId: string, appId: string): Promise; export declare function listWebApps(auth: OAuth2Client, projectId: string): Promise<{ appId: string | null | undefined; displayName: string | null | undefined; state: string | null | undefined; }[]>; export declare function createWebApp(auth: OAuth2Client, projectId: string, displayName: string): Promise; export declare function getWebConfig(auth: OAuth2Client, projectId: string, appId: string): Promise; export declare function deleteWebApp(auth: OAuth2Client, projectId: string, appId: string): Promise; export declare function enableService(auth: OAuth2Client, projectId: string, serviceId: string): Promise<{ service: string; state: string | null | undefined; }>; export declare function listEnabledServices(auth: OAuth2Client, projectId: string): Promise<{ name: string | null | undefined; title: string | null | undefined; }[]>; /** * Firebase 프로젝트에 Google Analytics(GA4)를 링크한다. * - analyticsAccountId: 그 GA 계정 하위에 GA4 property 를 새로 만들어 링크. * - analyticsPropertyId: 기존 GA4 property 에 링크. * 둘 중 정확히 하나는 필수다(addGoogleAnalytics API 계약 — 무인자 모드 없음). * 앱별 data stream(android/ios measurement)은 링크 후 Firebase 가 자동 생성한다. * (반환값은 long-running Operation — 완료까지 수 초 소요될 수 있음.) */ export declare function linkAnalytics(auth: OAuth2Client, projectId: string, opts?: { analyticsAccountId?: string; analyticsPropertyId?: string; }): Promise; /** 프로젝트의 GA4 링크 상세 — 연결된 analyticsProperty + 앱↔stream 매핑 조회. */ export declare function getAnalyticsDetails(auth: OAuth2Client, projectId: string): Promise; export declare function enableCommonServices(auth: OAuth2Client, projectId: string): Promise<({ service: string; status: string; message?: undefined; } | { service: string; status: string; message: any; })[]>;