/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { APIClient, type IOptions } from '@heroku-cli/command';
import { Dyno as APIDyno } from '@heroku-cli/schema';
import { HTTP } from '@heroku/http-call';
import * as net from 'net';
import { Duplex } from 'stream';
import * as tls from 'tls';
import { URL } from 'url';
export interface DynoOpts {
    app: string;
    attach?: boolean;
    command: string;
    dyno?: string;
    env?: string;
    'exit-code'?: boolean;
    heroku: APIClient;
    listen?: boolean;
    'no-tty'?: boolean;
    notificationSubtitle?: string;
    notify?: boolean;
    showStatus?: boolean;
    size?: string;
    type?: string;
}
interface HerokuApiClientRun extends APIClient {
    options: IOptions & {
        rejectUnauthorized?: boolean;
    };
}
export default class Dyno extends Duplex {
    opts: DynoOpts;
    dyno?: APIDyno;
    heroku: HerokuApiClientRun;
    input: any;
    legacyUri?: {
        [key: string]: any;
    };
    p: any;
    reject?: (reason?: any) => void;
    resolve?: (value?: unknown) => void;
    unpipeStdin: any;
    uri?: URL;
    useSSH: any;
    private _notified?;
    private _startedAt?;
    constructor(opts: DynoOpts);
    get _useSSH(): boolean | undefined;
    _connect(): Promise<unknown>;
    _doStart(retries?: number): Promise<HTTP<unknown> | undefined>;
    _env(): {
        [key: string]: any;
    };
    _handle(localServer: net.Server): void;
    _isDebug(): boolean | "" | undefined;
    _notify(): void;
    _read(): void;
    _readData(c?: tls.TLSSocket): (data: string) => void;
    _readStdin(c: tls.TLSSocket): void;
    _rendezvous(): Promise<unknown>;
    _ssh(retries?: number): Promise<unknown>;
    _status(status: string | undefined): string;
    _write(chunk: any, encoding: any, callback: any): void;
    attach(): any;
    start(): Promise<void>;
}
export {};
