export declare function listVersions(appId: string): Promise<{ id: string; version: string | undefined; state: string | undefined; releaseType: string | undefined; createdDate: string | undefined; }[]>; export type ApplePlatform = 'IOS' | 'MAC_OS' | 'TV_OS' | 'VISION_OS'; export type AppleReleaseType = 'MANUAL' | 'AFTER_APPROVAL' | 'SCHEDULED'; export interface CreateVersionInput { appId: string; versionString: string; platform: ApplePlatform; copyright?: string; releaseType?: AppleReleaseType; earliestReleaseDate?: string; buildId?: string; } export declare function createVersion(input: CreateVersionInput): Promise<{ id: any; version: any; platform: any; state: any; releaseType: any; createdDate: any; }>; /** * 기존 버전 레코드의 versionString 을 바꾼다 (예: 2.0.5 → 2.0.6). * * 왜 필요한가: ASC 는 편집 가능한 버전이 이미 있으면 새 버전 생성을 거부한다 * 409 ENTITY_ERROR.RELATIONSHIP.INVALID "You cannot create a new version of the App in the current state" * 그래서 거절/철회된 버전으로 다음 릴리스를 내보내려면 **같은 레코드의 이름을 올려야** 한다. * 빌드는 CFBundleShortVersionString 이 일치하는 버전에만 붙으므로, 2.0.6 빌드를 올렸다면 * 버전 레코드도 2.0.6 이어야 attach 가 된다. * * 편집 가능한 상태(PREPARE_FOR_SUBMISSION / DEVELOPER_REJECTED / REJECTED 등)에서만 통한다. */ export declare function updateVersionString(versionId: string, versionString: string): Promise<{ versionId: string; versionString: any; state: any; platform: any; }>; export declare function attachBuildToVersion(versionId: string, buildId: string): Promise<{ versionId: string; buildId: string; ok: boolean; }>; /** * 가장 최신 VALID 빌드를 자동으로 찾아 versionId 에 attach. * * 흐름: * 1. versionId → appId 역추적 (`getVersionAppAndPlatform`). * 2. `listBuilds(appId)` 로 최근 10개 빌드 조회 (sort: uploadedDate desc). * 3. `processingState === 'VALID'` 필터. * 4. `minBuildNumber` 옵션 있으면 buildNumber 숫자 기준 필터. * 5. buildNumber 숫자 최대값으로 정렬 → 1개 선택. * 6. attach. * * 사용처: 1.4.x 같은 매 배포마다 `appstore_list_builds` → 수동 탐색 → `appstore_attach_build` 의 * 3-step 을 한 번에 줄임. 실수로 PROCESSING 중인 빌드를 attach 해서 심사 제출 시점에 깨지는 * 케이스도 차단. */ export declare function attachLatestValidBuild(versionId: string, opts?: { minBuildNumber?: number; }): Promise<{ versionId: string; attachedBuildId: string; buildNumber: string; uploadedDate?: string; }>; export declare function getVersionLocalizations(versionId: string): Promise<{ id: string; locale: string | undefined; description: string | undefined; keywords: string | undefined; promotionalText: string | undefined; whatsNew: string | undefined; }[]>; export interface LocalizationUpdateFields { whatsNew?: string; description?: string; keywords?: string; promotionalText?: string; supportUrl?: string; marketingUrl?: string; } export declare function updateVersionLocalization(localizationId: string, fields: LocalizationUpdateFields): Promise; /** * versionId + locale로 로컬라이제이션을 찾아서 PATCH. * localizationId를 직접 모를 때 편의용. */ export declare function updateVersionWhatsNew(versionId: string, locale: string, fields: LocalizationUpdateFields): Promise; export declare function updateReviewNotes(versionId: string, notes: string): Promise<{ reviewDetailId: string; notes: string; created: boolean; }>; export declare function getReviewNotes(versionId: string): Promise<{ reviewDetailId: string | null; notes: string | null; contactEmail: string | null; }>; export declare function listBuilds(appId: string): Promise<{ id: string; version: string | undefined; uploadedDate: string | undefined; processingState: string | undefined; }[]>; export declare function getVersionAppAndPlatform(versionId: string): Promise<{ appId: string; platform: string; }>;