UNPKG

@extenshi/mcp

Version:

Extenshi MCP server — bring the extension catalog (search, security, market research) and pre-publish scanning into your AI tools

245 lines • 13.1 kB
/** 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>; }, "strict", z.ZodTypeAny, { name: string; linkedProjectId?: string | undefined; }, { name: string; linkedProjectId?: string | 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.ZodEnum<["one_time", "subscription", "lifetime"]>; interval: z.ZodDefault<z.ZodNullable<z.ZodEnum<["month", "year"]>>>; amountMinor: z.ZodNumber; currency: z.ZodEnum<["usd", "eur", "gbp"]>; title: z.ZodString; description: z.ZodDefault<z.ZodNullable<z.ZodString>>; features: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; sortOrder: z.ZodDefault<z.ZodNumber>; }, "strict", z.ZodTypeAny, { appId: string; sku: string; kind: "one_time" | "subscription" | "lifetime"; interval: "month" | "year" | null; amountMinor: number; currency: "usd" | "eur" | "gbp"; title: string; description: string | null; features: string[]; sortOrder: number; }, { appId: string; sku: string; kind: "one_time" | "subscription" | "lifetime"; amountMinor: number; currency: "usd" | "eur" | "gbp"; title: string; interval?: "month" | "year" | null | 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>>; }, "strict", z.ZodTypeAny, { appId: string; locale: string; translations: Record<string, string>; sources?: Record<string, string> | undefined; }, { appId: string; locale: string; translations: Record<string, string>; sources?: Record<string, string> | undefined; }>; readonly setPayEnabled: z.ZodObject<{ appId: z.ZodString; } & { enabled: z.ZodBoolean; }, "strict", z.ZodTypeAny, { appId: string; enabled: boolean; }, { appId: string; enabled: boolean; }>; 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. 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 and optional project link."], 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."], 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. The output contains sensitive customer and payment data."], readonly ["getPaySeller", "get_pay_seller", "seller", "paySeller.get", false, "Read seller connection, public profile, offers, 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. 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."], 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, features) keyed `<sku>/<field>`, with the project's languages and each language's translated, missing and outdated fields. 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."], 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. Prices, SKUs and plans are not changed."], 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 ["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