/**
 * This file was auto-generated by Fern from our API Definition.
 */
import * as environments from "../../../../../../environments";
import * as core from "../../../../../../core";
import * as Merge from "../../../../../index";
export declare namespace AsyncPassthrough {
    interface Options {
        environment?: core.Supplier<environments.MergeEnvironment | string>;
        /** Specify a custom URL to connect the client to. */
        baseUrl?: core.Supplier<string>;
        apiKey: core.Supplier<core.BearerToken>;
        /** Override the X-Account-Token header */
        accountToken?: core.Supplier<string | undefined>;
        /** Additional headers to include in requests. */
        headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
        fetcher?: core.FetchFunction;
    }
    interface RequestOptions {
        /** The maximum time to wait for a response in seconds. */
        timeoutInSeconds?: number;
        /** The number of times to retry the request. Defaults to 2. */
        maxRetries?: number;
        /** A hook to abort the request. */
        abortSignal?: AbortSignal;
        /** Override the X-Account-Token header */
        accountToken?: string | undefined;
        /** Additional query string parameters to include in the request. */
        queryParams?: Record<string, unknown>;
        /** Additional headers to include in the request. */
        headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
    }
}
export declare class AsyncPassthrough {
    protected readonly _options: AsyncPassthrough.Options;
    constructor(_options: AsyncPassthrough.Options);
    /**
     * Asynchronously pull data from an endpoint not currently supported by Merge.
     *
     * @param {Merge.crm.DataPassthroughRequest} request
     * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.crm.asyncPassthrough.create({
     *         method: "GET",
     *         path: "/scooters"
     *     })
     */
    create(request: Merge.crm.DataPassthroughRequest, requestOptions?: AsyncPassthrough.RequestOptions): core.HttpResponsePromise<Merge.crm.AsyncPassthroughReciept>;
    private __create;
    /**
     * Retrieves data from earlier async-passthrough POST request
     *
     * @param {string} asyncPassthroughReceiptId
     * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id")
     */
    retrieve(asyncPassthroughReceiptId: string, requestOptions?: AsyncPassthrough.RequestOptions): core.HttpResponsePromise<Merge.crm.AsyncPassthroughRetrieveResponse>;
    private __retrieve;
    protected _getAuthorizationHeader(): Promise<string>;
}
