import type { FiatStepResponse, SubmitTransition, Surface, SurfaceResult } from '@funkit/connect-core'; import type { StripeAuthorizeResult, StripeOnrampError } from './stripeOnramp'; export interface StripeSessionAuthStart { transition: SubmitTransition; verifiedEmail: string; } /** * Reads the frozen Stripe auth-start seam from a generic `SESSION_AUTH` step. * The backend owns the email and transition; the client only runs its local * Link-account prerequisite before firing them. */ export declare function stripeSessionAuthStart(step: FiatStepResponse | undefined, ctas: readonly SubmitTransition[]): StripeSessionAuthStart | undefined; export type StripeAuthSurface = { action: 'AUTHORIZE'; linkAuthIntentId: string; } | { action: 'AUTHENTICATE_WITH_TOKEN'; linkAuthTokenClientSecret: string; }; /** Narrows the two Stripe native authentication surfaces at the adapter boundary. */ export declare function stripeAuthSurface(surface: Surface): StripeAuthSurface | undefined; /** * Flat, like `stripeAuthorizationReport` beside it and for the same reason: this * surface answers a SUBMIT, and `injectExpects` fills nothing for a transition * that is not a `CLIENT_SURFACE`. Nested under `result` the outcome was dropped * during body assembly, so the buyer's consent never left the device. */ export declare const stripeSeamlessAuthReport: (authenticated: boolean) => SurfaceResult; /** * Maps Stripe's SDK union onto the frozen wire outcomes, one key per declared * input. Flat rather than nested under `result`: the transition carrying this * is a SUBMIT, so body assembly takes each value by the input name the * envelope declares, and `customerId` stays conditional by being absent on * anything but consent rather than by being undefined inside a wrapper. */ export declare function stripeAuthorizationReport(result: StripeAuthorizeResult): SurfaceResult | undefined; /** * Takes the error optionally. The SDK's result is declared as a union whose * failure member always carries one, but an undeclared shape does reach here at * runtime, and reading `.code` off it threw rather than reporting no outcome. */ export declare function isStripeCancellation(error?: StripeOnrampError): boolean; //# sourceMappingURL=stripeSessionAuth.d.ts.map