import { Config } from "./config";
import { AuthenticationRequest } from "./contract/authentication-request";
import { AuthenticationSign } from "./contract/authentication-sign";
import { HttpClient } from "./http-client";
export { resolveIframeBaseUrl } from "./config";
/**
 * Resolves the auth endpoint path for the given API version.
 * v3 and earlier expose POST /auth at the version prefix.
 * v4 and later moved auth under POST /initialize/auth.
 * Unrecognized version strings fall back to the latest layout.
 */
export declare function resolveAuthPath(apiVersion: string): string;
/**
 * Returns true when the given API version is v4 or later (or unrecognized,
 * in which case we treat it as the latest supported version).
 */
export declare function isV4OrAbove(apiVersion: string): boolean;
export declare class TyradsSDK {
    protected httpClient: HttpClient;
    protected config: Config;
    /**
     * Creates an instance of TyradsSDK.
     * @param {Config} config - The configuration object for the SDK.
     */
    constructor(config: Config);
    /**
     * Creates an instance of TyradsSDK.
     * @param apiKey - The API key for authentication.
     * @param apiSecret - The API secret for authentication.
     * @param language - The language for the SDK (default is 'en').
     * @param apiVersion - Optional API version override (e.g. 'v3.0', 'v4.0'). Defaults to the SDK's latest supported version when omitted.
     * @returns An instance of TyradsSDK.
     */
    static make(apiKey?: string, apiSecret?: string, language?: string, apiVersion?: string): TyradsSDK;
    /**
     * Authenticates a user with the Tyrads SDK.
     * @param {AuthenticationRequest} request - The authentication request containing user details.
     * @returns {Promise<AuthenticationSign | null>} A promise that resolves to an AuthenticationSign object if authentication is successful, or null if it fails.
     * @throws {Error}
     * @description This method validates the authentication request, sends it to the Tyrads API,
     * and returns an AuthenticationSign object containing the authentication token, publisher user ID, age,
     * and gender.
     */
    authenticate(request: AuthenticationRequest): Promise<AuthenticationSign | null>;
    /**
     * Generates an iframe URL for the Tyrads SDK.
     * @param {AuthenticationSign | string} authSignOrToken - An instance of AuthenticationSign or a string token.
     * @param {string | null} deeplinkTo - Optional deeplink to redirect after authentication.
     * @param {number | null} placementId - Optional placement ID forwarded as the `placementId` query param. v4+ only.
     * @returns {string} The generated iframe URL.
     * @throws {Error} If the arguments are invalid.
     * @throws {Error} If the deeplinkTo argument is not a string or null.
     * @throws {Error} If placementId is provided and the SDK is configured for an API version below v4.
     * @description This method constructs a URL for the Tyrads iframe, including the authentication token
     * and an optional deeplink parameter. The token can be provided as an instance of AuthenticationSign or as a string.
     * If the deeplinkTo parameter is provided, it will be included in the URL as a query parameter.
     */
    iframeUrl(authSignOrToken: AuthenticationSign | string, deeplinkTo?: string | null, placementId?: number | null): string;
    /**
     * Generates a URL for the premium widget iframe.
     *
     * @param authSignOrToken - Authentication token or AuthenticationSign instance for authorization
     * @param name - Optional name parameter to be included in the URL
     * @param placementId - Optional placement ID forwarded as the `placementId` query param. v4+ only.
     * @returns A fully constructed URL string for the iframe widget
     *
     * @throws {Error} If authSignOrToken is neither a string nor an AuthenticationSign instance
     * @throws {Error} If name is provided but is not a string
     * @throws {Error} If placementId is provided and the SDK is configured for an API version below v4.
     *
     * @description This method constructs a URL for the Tyrads premium widget iframe, including the authentication token
     * and an optional name parameter. The token can be provided as an instance of AuthenticationSign or as a string.
     * If the name parameter is provided, it will be included in the URL as a query parameter.
     */
    iframePremiumWidget(authSignOrToken: AuthenticationSign | string, name?: string | null, placementId?: number | null): string;
    private assertValidPlacementId;
}
