import type { CoreMethod } from './methods';
import type { Asset, UploadError, UploadProgress } from './showpad';
/**
 * @internal Only type needed from serialize-error (ESM version) and causing
 * ESM import issues in the CLI: https://github.com/sindresorhus/serialize-error/blob/main/index.d.ts
 */
export type ErrorObject = {
    name?: string;
    message?: string;
    stack?: string;
    cause?: unknown;
    code?: string;
} & JSON;
type UploadResponse = {
    uploadStatus: 'queued' | 'processing';
    data: undefined;
} | {
    uploadStatus: 'uploading';
    data: UploadProgress;
} | {
    uploadStatus: 'success';
    data: {
        asset: Asset;
    };
} | {
    uploadStatus: 'failed';
    data: UploadError;
};
type Response<T> = T | UploadResponse | ErrorObject;
export interface MessageResponse<T> {
    requestId: string;
    isError?: boolean;
    response: Response<T>;
}
export declare const hasUploadStatus: <T>(response: Response<T>) => response is UploadResponse;
export interface MessageRequest {
    id: string;
    method: CoreMethod;
    args: unknown[];
}
export interface Base64UploadData {
    file: string;
    filename: string;
}
export {};
