import type { AppStoreProductType } from './http.js'; /** * submit_for_review dry-run 프리뷰 — 비가역 제출 직전 사용자 확인용. * * 1.4.x 배포 사고 누적: submit 직후 되돌리지 못해 새 versionString bump 으로 우회해야 * 하는 케이스가 반복됨 (reference_appstore_cancel_review_window). 그 원인이던 * cancel_review 버그(submitted:false → 항상 409)는 2026-07-25 에 canceled:true 로 고쳤고, * 이제 WAITING_FOR_REVIEW 까지는 되돌릴 수 있다. 그래도 IN_REVIEW 이후는 못 되돌리니 * 호출자가 의도한 그 버전·빌드인지 미리 보여줘서 잘못된 versionId 제출을 차단한다. */ export declare function buildSubmitForReviewPreview(versionId: string): Promise<{ versionId: string; versionString?: string; state?: string; appId: string; platform: string; attachedBuild?: { id: string; buildNumber?: string; uploadedDate?: string; processingState?: string; }; whatsNewByLocale: Array<{ locale: string; excerpt: string; length: number; }>; }>; export declare function submitVersionForReview(versionId: string): Promise<{ submissionId: string; appId: string; platform: string; versionId: string; reusedSubmission: boolean; itemAttached: boolean; recoveredFromStaleSubmission: boolean; state: any; }>; export declare function addProductToReviewSubmission(args: { internalId: string; productType: AppStoreProductType; }): Promise<{ internalId: string; productType: AppStoreProductType; endpoint: string; submissionId?: string; }>; export interface ReviewSubmissionSummary { id: string; state?: string; submittedDate: string | null; items: Array<{ id: string; state?: string; targetType?: string; targetId?: string; versionString?: string; appVersionState?: string; /** IAP/구독/구독그룹 항목의 식별자 — productId 또는 referenceName. */ label?: string; /** 대상 리소스 자체의 상태 (상품이면 READY_TO_SUBMIT / WAITING_FOR_REVIEW 등). */ targetState?: string; }>; } export declare function listReviewSubmissions(args: { appId: string; platform?: string; limit?: number; }): Promise<{ appId: string; platform: string; submissions: ReviewSubmissionSummary[]; }>; /** 묶음에서 항목 제거 (removed=true PATCH). ASC 웹 "재제출" 이 내부적으로 하는 그 동작. */ export declare function removeReviewSubmissionItem(itemId: string): Promise<{ itemId: string; state?: string; removed: boolean; }>; /** * 이미 존재하는 묶음에 앱 버전을 항목으로 끼워 넣는다. * * 앱 첫 심사에서 반드시 필요하다. 웹에서 상품을 담으면 **상품만 든 묶음**이 새로 생기는데, * 그대로 제출하면 Apple 이 막는다: * 409 ENTITY_ERROR.RELATIONSHIP.REQUIRED * "must have an approved appStoreVersions ... or an appStoreVersions must be included * in this review submission" * 즉 상품 묶음에는 앱 버전이 함께 있어야 한다. reviewSubmissionItems 는 상품 관계는 * 거부하지만 **appStoreVersion 관계는 받는다** — 그래서 버전만 이쪽으로 옮기면 된다. * * 버전이 다른 묶음에 이미 물려 있으면 그 묶음을 먼저 정리해야 한다: * - 미제출(READY_FOR_REVIEW) 묶음이면 appstore_remove_review_submission_item * - 제출된(WAITING_FOR_REVIEW) 묶음이면 항목 제거가 막히므로 appstore_cancel_review 로 묶음째 취소 */ export declare function addVersionToReviewSubmission(args: { submissionId: string; versionId: string; }): Promise<{ itemId?: string; submissionId: string; versionId: string; itemCount: number; }>; export declare function cancelVersionReview(versionId: string): Promise<{ submissionId: string; previousState: string; newState: string; versionId: string; }>;