import { Connection } from "penpal"; //#region src/penpal/connect-tunnel-x.d.ts type TunnelXIFrameMethods = { startPayment: () => void; confirmPayment: () => void; submitCheckout: (values: Record) => Promise; getCheckoutPreview: () => void; getCardSetupIntent: (cardSetupIntentId: string) => Promise; createCardSetupIntent: (secureToken: string) => Promise; queryPublicEndpoint: (methodName: string, params: unknown, options?: RequestOptions) => Promise; }; type TunnelXParentMethods = Record; type TunnelXIFrameConnection = Connection; type TunnelXParentConnection = Connection; declare const connectToTunnelXIframe: (iframe: HTMLIFrameElement, methods: TunnelXParentMethods) => Connection; declare const connectToTunnelXParent: (methods: TunnelXIFrameMethods) => Connection; /** * SDK type for publicEndpoints proxy. * Matches the methods on PublicCors from @pkg/sdk that are called through queryPublicEndpoint. * Parameter types match the SDK's operation request types. * All methods accept an optional RequestOptions parameter for passing headers (e.g., x-request-id). */ type PublicEndpointsProxy = { createCardSetupIntent: (params: { checkoutToken: string; }, options?: RequestOptions) => Promise; updateCardSetupIntent: (params: { checkoutToken: string; cardSetupIntentId: string; updateCardSetupIntentReq: UpdateCardSetupIntentReq; }, options?: RequestOptions) => Promise; getCardSetupIntent: (params: { checkoutToken: string; cardSetupIntentId: string; }, options?: RequestOptions) => Promise; cardCheckout: (params: { checkoutToken: string; publicCardCheckoutRequest: PublicCardCheckoutRequest; }, options?: RequestOptions) => Promise; cardCheckoutVerify: (params: { checkoutToken: string; }, options?: RequestOptions) => Promise; }; declare class TunnelXManager { private penpalConn; _methods: TunnelXIFrameMethods; static createFromPenpalConnection: (penpalConn: TunnelXIFrameConnection) => Promise; private constructor(); /** * Makes publicEndpoints act like a real PK client, but actually forwards all calls * through queryPublicEndpoint and sends it through penpal. */ get publicEndpoints(): PublicEndpointsProxy; destroy(): void; } //#endregion export { connectToTunnelXParent as a, connectToTunnelXIframe as i, TunnelXManager as n, TunnelXParentConnection as r, TunnelXIFrameConnection as t }; //# sourceMappingURL=connect-tunnel-x-BKtMfoGh.d.mts.map