/**
 * Multi-store publishing for the MCP `publish_extension` tool.
 *
 * Thin wrapper over @extenshi/publisher: credentials come from the MCP
 * client's environment (same env vars as `extenshi publish`, defined once in
 * the publisher's STORE_ENV), the upload goes straight from this machine to
 * the store APIs. FREE — no Extenshi API key, nothing passes through Extenshi
 * servers. Chrome takes the author's own service account key.
 */
import { type EnvStoreCredentials, type StoreType, type UniversalPublishResult } from '@extenshi/publisher';
export type StoreCredentials = EnvStoreCredentials;
export declare const ENV_DOCS: Record<StoreType, readonly string[]>;
/**
 * Store credentials, with an explicitly stated AMO add-on id filling
 * FIREFOX_ADDON_GUID when the environment has none. A different environment
 * value is refused: one run publishes to one add-on id.
 */
export declare function storeCredentialsFor(addonId?: string, env?: NodeJS.ProcessEnv, stores?: StoreType[]): StoreCredentials;
/** Credentials for `stores` (all stores when empty); key files are read only for those. */
export declare function readStoreCredentials(env?: NodeJS.ProcessEnv, stores?: StoreType[]): StoreCredentials;
export declare function credentialsHelp(stores: StoreType[], env?: NodeJS.ProcessEnv): string;
export interface PublishArgs {
    artifactPath: string;
    stores?: StoreType[];
    firefoxArtifactPath?: string;
    /** Workspace the artifacts must live inside (default: cwd). */
    workspaceRoot?: string;
    /** Firefox: public release notes (en-US). Edge: notes for certification without reviewerNotes. Chrome: not sent. */
    releaseNotes?: string;
    /** Reviewers only. Firefox: AMO approval notes. Edge: notes for certification. Chrome: not sent. */
    reviewerNotes?: string;
    /** Explicit AMO add-on id; fills FIREFOX_ADDON_GUID when the environment has none. */
    addonId?: string;
    /**
     * Firefox extras. With `listingPath`: a listed AMO submission with metadata
     * instead of a version-only upload. `sourcePath` alone: a version-only upload
     * to an existing add-on with the reviewer source attached to the new version;
     * the listing is not read or changed.
     */
    firefoxListing?: {
        listingPath?: string;
        sourcePath?: string;
        /** Needs listingPath: the previews belong to the listing. */
        screenshotsDir?: string;
        /** Resolved by amoCreateAllowed — creating an add-on fixes its id permanently. Listing only. */
        allowCreate?: boolean;
        replaceScreenshots?: boolean;
    };
}
export declare class PublishSetupError extends Error {
}
/**
 * Whether this call may CREATE a new AMO add-on. With a project, its
 * owner-decided `amo.addonId` governs (and a different FIREFOX_ADDON_GUID is
 * refused). Without one, `allowNewAddon` is the switch and `addonId` has to
 * state the id explicitly — it is never taken silently from the environment.
 * Mirrors the CLI's gate.
 */
export declare function amoCreateAllowed(opts: {
    addonGuid: string;
    allowNewAddon?: boolean;
    addonId?: string;
    projectId?: string;
    decision?: {
        status: string;
        value: unknown;
    } | null;
}): boolean;
/**
 * An MCP installed with an older @extenshi/publisher would drop reviewer notes
 * without a word (its options schema strips unknown keys), so refuse instead.
 * Read through the namespace: a missing named export would fail the import.
 */
export declare function requireReviewerNotesSupport(firefox?: {
    AMO_APPROVAL_NOTES_MAX?: unknown;
}): void;
/**
 * An MCP installed with an older @extenshi/publisher would create the version and
 * drop the source archive without a word (it ignores sourceFilePath without a
 * listing), and AMO rejects a bundled version that has no source. Refuse instead.
 */
export declare function requireSourceWithoutListingSupport(firefox?: {
    AMO_SOURCE_WITHOUT_LISTING?: unknown;
}): void;
/**
 * Load the Firefox extras. With a listing: the listing, source and screenshots
 * of a listed AMO submission. Source alone: only `sourceFilePath`, for the new
 * version of an existing add-on.
 */
export declare function loadFirefoxListing(listing: NonNullable<PublishArgs['firefoxListing']>): {
    sourceFilePath: string | undefined;
    listing?: undefined;
    screenshotPaths?: undefined;
    allowCreate?: undefined;
    replaceScreenshots?: undefined;
} | {
    listing: {
        defaultLocale: string;
        explicitDefaultLocale: boolean;
        name: {
            [x: string]: string;
        };
        summary: {
            [x: string]: string;
        };
        description: {
            [x: string]: string;
        } | undefined;
        developerComments: {
            [x: string]: string;
        } | undefined;
        homepage: {
            [x: string]: string;
        } | undefined;
        supportEmail: {
            [x: string]: string;
        } | undefined;
        supportUrl: {
            [x: string]: string;
        } | undefined;
        privacyPolicy: {
            [x: string]: string;
        } | undefined;
        eula: {
            [x: string]: string;
        } | undefined;
        releaseNotes: {
            [x: string]: string;
        } | undefined;
        customLicense: {
            name: {
                [x: string]: string;
            };
            text: {
                [x: string]: string;
            };
        } | undefined;
        screenshots: {
            file: string;
            caption: {
                [x: string]: string;
            } | undefined;
        }[] | undefined;
        categories: string[];
        tags?: string[] | undefined;
        slug?: string | undefined;
        requiresPayment?: boolean | undefined;
        contributionsUrl?: string | undefined;
        license?: string | undefined;
        approvalNotes?: string | undefined;
        compatibility?: ("firefox" | "android")[] | Partial<Record<"firefox" | "android", {
            min?: string | undefined;
            max?: string | undefined;
        }>> | undefined;
        addonId?: string | undefined;
    };
    sourceFilePath: string | undefined;
    screenshotPaths: string[] | undefined;
    allowCreate: boolean;
    replaceScreenshots: boolean;
} | undefined;
export declare function publishArtifact(args: PublishArgs): Promise<UniversalPublishResult>;
export declare function validateStoreCredentials(stores?: StoreType[]): Promise<Array<{
    store: StoreType;
    configured: boolean;
    valid: boolean;
}>>;
//# sourceMappingURL=publish.d.ts.map