import { APIResource } from "../../../core/resource.js"; import * as WhatsappAPI from "../../auth/whatsapp/whatsapp.js"; import * as VerificationAPI from "./verification.js"; import { APIPromise } from "../../../core/api-promise.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class StepUp extends APIResource { /** * Request OTP for step-up authentication before a sensitive action (e.g. data * export). */ requestVerification(params: StepUpRequestVerificationParams, options?: RequestOptions): APIPromise; /** * Resend OTP for an active step-up verification challenge. * * @deprecated */ resend(challengeID: string, params: StepUpResendParams, options?: RequestOptions): APIPromise; /** * Verify step-up OTP and receive a one-time token for sensitive actions. */ verify(challengeID: string, params: StepUpVerifyParams, options?: RequestOptions): APIPromise; } /** * Phone and email verification resend model. * * Attributes: channel: Channel to resend verification (SMS, WhatsApp, or email) */ export interface VerificationResendModel { /** * Channel to resend verification */ channel: VerificationAPI.VerificationChannel; } /** * Phone and email verification resend response model. * * Attributes: cooldown: Cooldown period in seconds before next resend is allowed */ export interface VerificationResendResponseModel { /** * Cooldown period in seconds */ cooldown: number; } /** * Step-up OTP verified; short-lived token for sensitive endpoints. */ export interface StepUpVerifyResponse { /** * Seconds until the step-up token expires. */ expires_in_seconds: number; /** * One-time token for sensitive actions (e.g. data export). */ otp_verification_token: string; } export interface StepUpRequestVerificationParams { /** * Body param: Delivery channel for the step-up OTP. */ channel?: VerificationAPI.VerificationChannel; /** * Body param: Optional contact override; defaults to the authenticated user's * email. */ contact?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface StepUpResendParams { /** * Body param: Channel to resend verification */ channel: VerificationAPI.VerificationChannel; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface StepUpVerifyParams { /** * Body param: OTP code to verify */ code: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace StepUp { export { type VerificationResendModel as VerificationResendModel, type VerificationResendResponseModel as VerificationResendResponseModel, type StepUpVerifyResponse as StepUpVerifyResponse, type StepUpRequestVerificationParams as StepUpRequestVerificationParams, type StepUpResendParams as StepUpResendParams, type StepUpVerifyParams as StepUpVerifyParams, }; } //# sourceMappingURL=step-up.d.ts.map