// This file is auto-generated by @hey-api/openapi-ts

export type RequestOtpRequest = {
    /**
     * Phone number to send OTP to
     */
    phone_number: string;
};

export type RequestOtpResponse = {
    /**
     * Confirmation message
     */
    message: string;
    /**
     * Status of the request
     */
    ok: boolean;
};

export type VerifyOtpRequest = {
    /**
     * Phone number to verify OTP for
     */
    phone_number: string;
    /**
     * One-time password to verify
     */
    otp: string;
    /**
     * Login challenge for verification
     */
    login_challenge: string;
};

export type VerifyOtpResponse = {
    /**
     * URL to redirect to after successful verification
     */
    redirect_url: string;
    /**
     * Status of the verification
     */
    ok: boolean;
    /**
     * Confirmation message
     */
    message: string;
};

export type AcceptConsentRequest = {
    /**
     * The consent challenge to accept
     */
    consent_challenge: string;
    /**
     * Phone number associated with the consent
     */
    phone_number: string;
};

export type AcceptConsentResponse = {
    /**
     * URL to redirect to after accepting consent
     */
    redirect_url: string;
    /**
     * Status of the consent acceptance
     */
    ok: boolean;
    message: string;
};

export type PostAuthOtpRequestData = {
    body: RequestOtpRequest;
    path?: never;
    query?: never;
    url: '/auth/otp/request';
};

export type PostAuthOtpRequestErrors = {
    /**
     * Bad request
     */
    400: RequestOtpResponse;
};

export type PostAuthOtpRequestError = PostAuthOtpRequestErrors[keyof PostAuthOtpRequestErrors];

export type PostAuthOtpRequestResponses = {
    /**
     * OTP requested successfully
     */
    200: RequestOtpResponse;
};

export type PostAuthOtpRequestResponse = PostAuthOtpRequestResponses[keyof PostAuthOtpRequestResponses];

export type PostAuthOtpVerifyData = {
    body: VerifyOtpRequest;
    path?: never;
    query?: never;
    url: '/auth/otp/verify';
};

export type PostAuthOtpVerifyErrors = {
    /**
     * Bad request
     */
    400: VerifyOtpResponse;
};

export type PostAuthOtpVerifyError = PostAuthOtpVerifyErrors[keyof PostAuthOtpVerifyErrors];

export type PostAuthOtpVerifyResponses = {
    /**
     * OTP verified successfully
     */
    200: VerifyOtpResponse;
};

export type PostAuthOtpVerifyResponse = PostAuthOtpVerifyResponses[keyof PostAuthOtpVerifyResponses];

export type PostAuthConsentAcceptData = {
    body: AcceptConsentRequest;
    path?: never;
    query?: never;
    url: '/auth/consent/accept';
};

export type PostAuthConsentAcceptErrors = {
    /**
     * Bad request
     */
    400: AcceptConsentResponse;
};

export type PostAuthConsentAcceptError = PostAuthConsentAcceptErrors[keyof PostAuthConsentAcceptErrors];

export type PostAuthConsentAcceptResponses = {
    /**
     * Consent accepted successfully
     */
    200: AcceptConsentResponse;
};

export type PostAuthConsentAcceptResponse = PostAuthConsentAcceptResponses[keyof PostAuthConsentAcceptResponses];

export type ClientOptions = {
    baseUrl: `${string}://${string}` | (string & {});
};