/** * Art. 103(m) TRLGDCU waiver flow. * * Three things have to happen together (see CLAUDE.md §5): * * 1. The user expresses *prior express consent* to begin execution. * 2. They acknowledge they thereby lose the 14-day right of withdrawal. * 3. The contract is confirmed on a durable medium. * * This module owns #1 and #2 via a separate, unbundled consent prompt * — one inline message with the waiver text plus a single affirmative * button. Bundling this into ToS acceptance voids the waiver under * Spanish consumer law. #3 is satisfied implicitly by Telegram: every * outgoing message the bot sends is preserved in the chat (durable). * * The bot author supplies the wording (Polyglot text + version string). * Bumping `waiver.version` forces re-consent on the next purchase * attempt; old consents stay attached to old charges for audit (see * `ChargeRecord.waiverSnapshot`). */ import { InlineKeyboard } from "gramio"; import type { BotPaymentsConfig, PaymentsSession, WaiverRecord } from "./types.js"; /** * Callback fired when the user taps "✅ Consiento y comprendo" in the * waiver consent prompt. Carries the productKey of the in-flight * purchase so we can resume after persisting consent. * * `pk` (productKey) follows the shape validated by `payload.ts` — * `vip.N` / `credits.N` / `perks.X` — all ASCII-safe. */ export declare const waiverConsentCb: import("gramio").CallbackData<{ pk: string; } & {}, { pk: string; } & {}>; /** Fired when the user taps "❌ Cancelar" in the consent prompt. */ export declare const waiverCancelCb: import("gramio").CallbackData<{} & {}, {} & {}>; /** * Build the inline keyboard that accompanies the consent prompt. Three * buttons: * * 📖 Términos — URL to `legal.termsUrl` (informational, not the * affirmative action) * 🔒 Privacidad — URL to `legal.privacyUrl` (same) * ✅ Consiento y comprendo — the single affirmative action * ❌ Cancelar — back out without consenting * * The "✅" button carries the productKey the user was about to buy, so * the consent handler can resume the invoice flow on tap. */ export declare const waiverKeyboard: (cfg: BotPaymentsConfig, productKey: string, lang: string) => InlineKeyboard; /** * Render the consent body the user sees. Includes a short, neutral * header above the wording supplied by the bot author. The header is * separated by a blank line so reading order matches what consumer * authorities expect (waiver text is unambiguous and prominent). */ export declare const renderConsentBody: (cfg: BotPaymentsConfig, lang: string) => string; /** * Persist a fresh waiver record onto the current ctx's session. Callers * own the session shape via a structural narrow — this avoids a generic * type bloom across the plugin. */ export declare const persistWaiverOnSession: (ctx: { session: { pay?: PaymentsSession; }; }, version: string, locale: string) => WaiverRecord; //# sourceMappingURL=waiver.d.ts.map