/** Published packages deliberately carry this small contract locally; BFF validates again. */
import { z } from 'zod';
export declare const paySchemas: {
    readonly listPayApps: z.ZodObject<{
        includeArchived: z.ZodOptional<z.ZodBoolean>;
        cursor: z.ZodOptional<z.ZodString>;
        limit: z.ZodOptional<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        includeArchived?: boolean | undefined;
        cursor?: string | undefined;
        limit?: number | undefined;
    }, {
        includeArchived?: boolean | undefined;
        cursor?: string | undefined;
        limit?: number | undefined;
    }>;
    readonly createPayApp: z.ZodObject<{
        name: z.ZodString;
        linkedProjectId: z.ZodOptional<z.ZodString>;
        trialDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, "strict", z.ZodTypeAny, {
        name: string;
        linkedProjectId?: string | undefined;
        trialDays?: number | null | undefined;
    }, {
        name: string;
        linkedProjectId?: string | undefined;
        trialDays?: number | null | undefined;
    }>;
    readonly getPayApp: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly getPayReadiness: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly getPayPaymentEvidence: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly linkPayApp: z.ZodObject<{
        appId: z.ZodString;
    } & {
        projectId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        projectId: string;
    }, {
        appId: string;
        projectId: string;
    }>;
    readonly unlinkPayApp: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly archivePayApp: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly exportPayData: z.ZodObject<{
        appId: z.ZodString;
    } & {
        resource: z.ZodEnum<["offers", "payments", "subscriptions", "entitlements", "customers"]>;
        cursor: z.ZodOptional<z.ZodString>;
        limit: z.ZodOptional<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        resource: "offers" | "payments" | "subscriptions" | "entitlements" | "customers";
        cursor?: string | undefined;
        limit?: number | undefined;
    }, {
        appId: string;
        resource: "offers" | "payments" | "subscriptions" | "entitlements" | "customers";
        cursor?: string | undefined;
        limit?: number | undefined;
    }>;
    readonly getPaySeller: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly connectPaySeller: z.ZodObject<{
        appId: z.ZodString;
    } & {
        provider: z.ZodDefault<z.ZodLiteral<"stripe">>;
        accountKind: z.ZodDefault<z.ZodLiteral<"standard">>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        provider: "stripe";
        accountKind: "standard";
    }, {
        appId: string;
        provider?: "stripe" | undefined;
        accountKind?: "standard" | undefined;
    }>;
    readonly refreshPaySeller: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly setPaySellerProfile: z.ZodObject<{
        appId: z.ZodString;
    } & {
        profile: z.ZodObject<{
            displayName: z.ZodString;
            supportUrl: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodString]>;
            termsUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
        }, "strict", z.ZodTypeAny, {
            displayName: string;
            supportUrl: string;
            termsUrl: string | null;
        }, {
            displayName: string;
            supportUrl: string;
            termsUrl: string | null;
        }>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        profile: {
            displayName: string;
            supportUrl: string;
            termsUrl: string | null;
        };
    }, {
        appId: string;
        profile: {
            displayName: string;
            supportUrl: string;
            termsUrl: string | null;
        };
    }>;
    readonly upsertPayOffer: z.ZodObject<{
        appId: z.ZodString;
    } & {
        sku: z.ZodString;
        kind: z.ZodOptional<z.ZodEnum<["one_time", "subscription", "lifetime"]>>;
        interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<["month", "year"]>>>;
        amountMinor: z.ZodOptional<z.ZodNumber>;
        currency: z.ZodOptional<z.ZodEnum<["usd", "eur", "gbp"]>>;
        title: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        sortOrder: z.ZodOptional<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        sku: string;
        kind?: "one_time" | "subscription" | "lifetime" | undefined;
        interval?: "month" | "year" | null | undefined;
        amountMinor?: number | undefined;
        currency?: "usd" | "eur" | "gbp" | undefined;
        title?: string | undefined;
        description?: string | null | undefined;
        features?: string[] | undefined;
        sortOrder?: number | undefined;
    }, {
        appId: string;
        sku: string;
        kind?: "one_time" | "subscription" | "lifetime" | undefined;
        interval?: "month" | "year" | null | undefined;
        amountMinor?: number | undefined;
        currency?: "usd" | "eur" | "gbp" | undefined;
        title?: string | undefined;
        description?: string | null | undefined;
        features?: string[] | undefined;
        sortOrder?: number | undefined;
    }>;
    readonly archivePayOffer: z.ZodObject<{
        appId: z.ZodString;
    } & {
        sku: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        sku: string;
    }, {
        appId: string;
        sku: string;
    }>;
    readonly getPayOfferTranslations: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
    readonly setPayOfferTranslations: z.ZodObject<{
        appId: z.ZodString;
    } & {
        locale: z.ZodString;
        translations: z.ZodRecord<z.ZodString, z.ZodString>;
        sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        view: z.ZodDefault<z.ZodEnum<["saved_locale", "all_locales"]>>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        locale: string;
        translations: Record<string, string>;
        view: "saved_locale" | "all_locales";
        sources?: Record<string, string> | undefined;
    }, {
        appId: string;
        locale: string;
        translations: Record<string, string>;
        sources?: Record<string, string> | undefined;
        view?: "saved_locale" | "all_locales" | undefined;
    }>;
    readonly setPayEnabled: z.ZodObject<{
        appId: z.ZodString;
    } & {
        enabled: z.ZodBoolean;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        enabled: boolean;
    }, {
        appId: string;
        enabled: boolean;
    }>;
    readonly setPayTrial: z.ZodObject<{
        appId: z.ZodString;
    } & {
        trialDays: z.ZodNullable<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        appId: string;
        trialDays: number | null;
    }, {
        appId: string;
        trialDays: number | null;
    }>;
    readonly rotatePayKey: z.ZodObject<{
        appId: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        appId: string;
    }, {
        appId: string;
    }>;
};
export type PayMethod = keyof typeof paySchemas;
export type PayBff = {
    [M in PayMethod]: (input: z.infer<(typeof paySchemas)[M]>) => Promise<unknown>;
};
export declare const PAY_OPERATIONS: readonly [readonly ["listPayApps", "list_pay_apps", "list", "payApp.list", false, "List your independent Pay applications. No development project required. Paginated: nextCursor is set while more results exist."], readonly ["createPayApp", "create_pay_app", "create", "payApp.create", true, "Create an independent Pay application; linking a development project is optional. `trialDays` (0–365, optional) sets a free trial at once, since a new application has no buyers yet; set_pay_trial changes it later. Not idempotent: each call creates a new application, including a call repeated after a timeout."], readonly ["getPayApp", "get_pay_app", "get", "payApp.get", false, "Read your Pay application, its optional project link and its free trial (`trialDays`, null when there is none)."], readonly ["getPayReadiness", "get_pay_readiness", "readiness", "payApp.readiness", false, "Check current checkout and launch prerequisites. A passing checkout check does not prove a live external purchase or SDK publication. `warnings` are non-blocking (`ready` ignores them): offer_translations lists offer text not yet translated into the project's languages, with counts per language and fixWith (get_pay_offer_translations → set_pay_offer_translations)."], readonly ["getPayPaymentEvidence", "get_pay_payment_evidence", "payment-evidence", "payApp.paymentEvidence", false, "Read what Extenshi's own payment ledger proves about this application's payment path, per mode: checkout completed, license issued, an installation received the signed license, restored on a second installation, refund revoked. Derived from provider-signed webhooks, not from any report; opaque IDs and timestamps only, no buyer data. Only a live-mode purchase can satisfy a release's payment requirement; test-mode purchases are listed without satisfying it."], readonly ["linkPayApp", "link_pay_app", "link", "payApp.link", true, "Link your Pay application to your development project. Existing purchases remain attached to the Pay application."], readonly ["unlinkPayApp", "unlink_pay_app", "unlink", "payApp.unlink", true, "Remove the optional development-project link without deleting Pay data."], readonly ["archivePayApp", "archive_pay_app", "archive", "payApp.archive", true, "Archive your application and stop new checkout. Payment records and existing entitlements are preserved."], readonly ["exportPayData", "export_pay_data", "export", "payApp.export", false, "Export one page of one resource (offers, payments, subscriptions, entitlements or customers). nextCursor is null on the last page. Offer rows include sortOrder, their position on the paywall (lower shows first). The output contains sensitive customer and payment data."], readonly ["getPaySeller", "get_pay_seller", "seller", "paySeller.get", false, "Read seller connection, public profile, offers (terms, sortOrder, active and sync state), the publishable SDK key and the public entitlement verification key. Those two keys are the ones meant to be embedded in extension code; secret keys are not part of the response. Agreement signing and KYC take place in the browser."], readonly ["connectPaySeller", "connect_pay_seller", "connect", "paySeller.connect", true, "Start Stripe Connect onboarding and return a browser action URL. KYC and legal acceptance are completed by the author at that URL; this tool does not perform them."], readonly ["refreshPaySeller", "refresh_pay_seller", "refresh", "paySeller.refreshStatus", true, "Refresh current payment-provider onboarding status. This does not complete KYC or accept agreements."], readonly ["setPaySellerProfile", "set_pay_seller_profile", "profile", "paySeller.setPublicProfile", true, "Save the public seller profile: display name, support URL or email, and terms URL. The values are stored as provided and are publicly visible."], readonly ["upsertPayOffer", "upsert_pay_offer", "offer-upsert", "paySeller.upsertOffer", true, "Create or update an offer keyed by a stable SKU. On an existing offer every omitted field keeps its stored value: to change only the title or description, send appId, sku and the new text, and the price, features and paywall order (sortOrder) stay as they are; `description: null` clears the description. A new SKU needs kind, amountMinor, currency and title (and interval for a subscription), with sortOrder 0 when omitted (lower shows first). An archived SKU needs the same, since saving it puts it back on sale. Price is in minor currency units. Subscriptions keep the given billing interval; one-time and lifetime offers store no interval. Price and features are stored as provided. `features` are entitlement keys (e.g. `full`): the SDK checks them with hasFeature and extensions match offers by them, so they stay untranslated; localized paywall bullets come from the extension, via showPaywall({ features }) with text from its _locales. `followUps` names the translations a changed title or description left missing or outdated (set_pay_offer_translations)."], readonly ["archivePayOffer", "archive_pay_offer", "offer-archive", "paySeller.archiveOffer", true, "Stop offering a SKU for new checkout; historical purchases are preserved."], readonly ["getPayOfferTranslations", "get_pay_offer_translations", "offer-translations", "paySeller.getOfferTranslations", false, "Read the translatable text of the application's active offers (title, description) keyed `<sku>/<field>`, with the project's languages and each language's translated, missing and outdated fields. Feature keys are entitlement keys, listed under `notTranslated` and not counted as missing. The paywall shows an offer in the buyer's browser language when the project ships it; the SDK's own buttons and labels are already translated. get_project_state `localization` summarizes this with every other translated surface."], readonly ["setPayOfferTranslations", "set_pay_offer_translations", "offer-translate", "paySeller.setOfferTranslations", true, "Save one language of the offers' translations: `translations` maps `<sku>/<field>` keys from get_pay_offer_translations to text; `sources` (optional) carries the original each was translated from, and a save whose original has changed since is refused. An empty string removes a translation; a `<sku>/feature:<n>` key is refused (TRANSLATIONS_INVALID: features are entitlement keys). Prices, SKUs, plans and feature keys are not changed. Answers with the saved language's translations and every language's status (`view: 'saved_locale'`, the default); `view: 'all_locales'` returns every language's translations, as get_pay_offer_translations does."], readonly ["setPayEnabled", "set_pay_enabled", "enable", "paySeller.setEnabled", true, "Enable or disable new payments for the application; requires a connected payment provider. Enabling re-reads the seller status from the provider (charges and payouts). It does not verify the public profile, agreement or offer sync: buyers can check out only when every readiness check reported by get_pay_readiness passes. Enabling is a live commerce change."], readonly ["setPayTrial", "set_pay_trial", "trial", "payApp.setTrial", true, "Set the application's free trial: `trialDays` (0–365) free days for every installation, counted on Extenshi's server from the first time the SDK reads that installation's license; null turns the trial off. One clock per installation per application, so switching offers does not restart it, and an installation restored through purchase recovery keeps the earliest start. The end is derived from the stored start, so a new length also moves trials already running. The SDK reads it with getTrial() and the trial:ending / trial:ended events; the extension does not store a start date itself."], readonly ["rotatePayKey", "rotate_pay_key", "rotate-key", "paySeller.rotatePublishableKey", true, "Generate a new publishable SDK key. Not idempotent: each call issues another key. Prior keys remain accepted for installed extension builds; this does not revoke any secret."]];
/** The legacy seller API uses projectId as the payment namespace. Never substitute a linked project ID. */
export declare function payWireInput(method: PayMethod, input: Record<string, unknown>): Record<string, unknown>;
//# sourceMappingURL=pay.d.ts.map