import type { Surface } from '@funkit/connect-core'; import type { SurfaceAdapter } from './adapter'; import type { StripeOnrampClient } from './stripeOnramp'; /** * The calls the backend permits on this surface, as it names them. Kept as the * provider's own strings rather than re-encoded into a client vocabulary: the * surface is Stripe's, and a second set of names for the same three SDK methods * is a mapping to keep in sync for no gain. */ declare const STRIPE_KYC_CALLS: readonly ["attachKycInfo", "presentKycInfoVerification", "verifyIdentity"]; type StripeKycCall = (typeof STRIPE_KYC_CALLS)[number]; export interface StripeKycReconciliation { allowedCalls: readonly StripeKycCall[]; } /** * Stripe's KYC reconciliation surface. `kyc.assess` emits it whenever the Link * user has no `kyc_verified` verification, and names the SDK calls the client * may make to obtain one. */ export declare function matchStripeKycParams(surface: Surface): StripeKycReconciliation | undefined; /** * `response` is required rather than optional: the pay sheet's adapter takes it * optionally and this one was written without it at all, so every call on this * surface ran against a Link session nothing had woken. A caller with nothing to * pass says so with `undefined`; one that forgets no longer compiles. */ export declare function stripeKycAdapter(stripe: StripeOnrampClient, response: object | undefined): SurfaceAdapter; /** * `stage:code`, the shape `collectApplePay` already uses. Stripe answers most of these with a bare * `Failed`, which says nothing about which of the three calls refused; the stage is the only part * that identifies it. Everything Stripe gives beyond the code is logged rather than folded in here, * because this string travels to the backend as `errorType`. */ /** * The buyer closed Stripe's KYC sheet. * * Not a failure: nothing is wrong, nothing needs reporting to support, and the * only right answer is the quote screen they came from. Carried as a code for * the same reason `STRIPE_PAYMENT_CANCELLED` is — `onFailed` already routes * back to entry, and the screen suppresses its alert and its terminal for this * one code. */ export declare const STRIPE_KYC_CANCELLED = "stripe_kyc:cancelled"; /** * Stripe handed control back for an address it wants corrected. * * Its own code, but the same support terminal as any other refusal, because * today there is nowhere better to send the buyer: `POST /fiat/kyc/capture` * ignores the report, and `assess` answers any unverified customer with this * same surface, so every client-side route back — remounting, re-quoting — * returns here and asks Stripe the identical question. The code exists to make * that population countable before the round trip that can actually fix it. */ export declare const STRIPE_KYC_ADDRESS_UPDATE = "stripe_kyc:update_address"; export {}; //# sourceMappingURL=stripeKyc.d.ts.map