import type { UploadBundleResult } from '../schemas/bundle';
import type { UploadReporter, UploadSpinner } from './reporter';
import type { OptionsUpload } from './upload_interface';
import { CliUserError } from '../shared/cli-user-error';
import { createSupabaseClient } from '../utils';
type SupabaseType = Awaited<ReturnType<typeof createSupabaseClient>>;
export type { UploadBundleResult };
export type { UploadReporter, UploadSpinner };
/**
 * Thrown when `--fail-on-incompatible` aborts an upload because the bundle is
 * incompatible with the channel's current native packages. A dedicated type lets
 * `uploadBundle` skip the generic "retry the upload?" prompt — retrying an
 * incompatible bundle is pointless.
 *
 * Extends `CliUserError` so `shouldCapturePosthogException` skips it: the
 * `--fail-on-incompatible` abort is a state the user asked for, not a crash, so
 * it must not open an error tracking `$exception` issue. The non-zero exit, the
 * printed message, and the `Bundle Upload Blocked` event stay unchanged.
 */
export declare class IncompatibleBundleError extends CliUserError {
}
export declare function getDefaultUploadChannel(appId: string, supabase: SupabaseType, hostWeb: string): Promise<string>;
export declare function uploadBundleInternal(preAppid: string, options: OptionsUpload, silent?: boolean, reporter?: UploadReporter): Promise<UploadBundleResult>;
/**
 * Validate mutually-exclusive and dependent upload options, failing fast (via
 * `uploadFail`) before any network call. Exported so the option-conflict guards
 * (e.g. `--fail-on-incompatible` + `--ignore-metadata-check`) can be unit-tested
 * directly.
 */
export declare function checkValidOptions(options: OptionsUpload): void;
export declare function uploadBundle(appid: string, options: OptionsUpload): Promise<UploadBundleResult>;
