/**
 * 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`), the upload
 * goes straight from this machine to the store APIs. FREE — no Extenshi
 * API key, nothing passes through Extenshi servers.
 */
import { type StoreType, type UniversalPublishResult } from '@extenshi/publisher';
export interface StoreCredentials {
    chrome?: {
        appId: string;
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    };
    firefox?: {
        addonGuid: string;
        jwtIssuer: string;
        jwtSecret: string;
    };
    edge?: {
        productId: string;
        clientId: string;
        clientSecret: string;
        tenantId: string;
    };
}
export declare const ENV_DOCS: Record<StoreType, 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): StoreCredentials;
export declare function readStoreCredentials(env?: NodeJS.ProcessEnv): StoreCredentials;
export declare function credentialsHelp(stores: StoreType[]): string;
export interface PublishArgs {
    artifactPath: string;
    stores?: StoreType[];
    firefoxArtifactPath?: string;
    releaseNotes?: string;
    /** Explicit AMO add-on id; fills FIREFOX_ADDON_GUID when the environment has none. */
    addonId?: string;
    /** Listed AMO submission with metadata instead of a version-only upload. */
    firefoxListing?: {
        listingPath: string;
        sourcePath?: string;
        screenshotsDir?: string;
        /** Resolved by amoCreateAllowed — creating an add-on fixes its id permanently. */
        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;
/** Load the listing, source and screenshots for a listed AMO submission. */
export declare function loadFirefoxListing(listing: NonNullable<PublishArgs['firefoxListing']>): {
    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;
};
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