/// <reference types="supertest" />
import { PeerTubeServer } from '../server/server';
export interface OverrideCommandOptions {
    token?: string;
    expectedStatus?: number;
}
interface InternalCommonCommandOptions extends OverrideCommandOptions {
    url?: string;
    path: string;
    implicitToken: boolean;
    defaultExpectedStatus: number;
    contentType?: string;
    accept?: string;
    redirects?: number;
    range?: string;
    host?: string;
    headers?: {
        [name: string]: string;
    };
    requestType?: string;
    xForwardedFor?: string;
}
interface InternalGetCommandOptions extends InternalCommonCommandOptions {
    query?: {
        [id: string]: any;
    };
}
interface InternalDeleteCommandOptions extends InternalCommonCommandOptions {
    query?: {
        [id: string]: any;
    };
    rawQuery?: string;
}
declare abstract class AbstractCommand {
    protected server: PeerTubeServer;
    constructor(server: PeerTubeServer);
    protected getRequestBody<T>(options: InternalGetCommandOptions): Promise<T>;
    protected getRequestText(options: InternalGetCommandOptions): Promise<string>;
    protected getRawRequest(options: Omit<InternalGetCommandOptions, 'path'>): import("supertest").Test;
    protected getRequest(options: InternalGetCommandOptions): import("supertest").Test;
    protected deleteRequest(options: InternalDeleteCommandOptions): import("supertest").Test;
    protected putBodyRequest(options: InternalCommonCommandOptions & {
        fields?: {
            [fieldName: string]: any;
        };
    }): import("supertest").Test;
    protected postBodyRequest(options: InternalCommonCommandOptions & {
        fields?: {
            [fieldName: string]: any;
        };
    }): import("supertest").Test;
    protected postUploadRequest(options: InternalCommonCommandOptions & {
        fields?: {
            [fieldName: string]: any;
        };
        attaches?: {
            [fieldName: string]: any;
        };
    }): import("supertest").Test;
    protected putUploadRequest(options: InternalCommonCommandOptions & {
        fields?: {
            [fieldName: string]: any;
        };
        attaches?: {
            [fieldName: string]: any;
        };
    }): import("supertest").Test;
    protected updateImageRequest(options: InternalCommonCommandOptions & {
        fixture: string;
        fieldname: string;
    }): import("supertest").Test;
    protected buildCommonRequestOptions(options: InternalCommonCommandOptions): {
        url: string;
        path: string;
        token: string;
        expectedStatus: number;
        redirects: number;
        contentType: string;
        range: string;
        host: string;
        accept: string;
        headers: {
            [name: string]: string;
        };
        type: string;
        xForwardedFor: string;
    };
    protected buildCommonRequestToken(options: Pick<InternalCommonCommandOptions, 'token' | 'implicitToken'>): string;
    protected buildExpectedStatus(options: Pick<InternalCommonCommandOptions, 'expectedStatus' | 'defaultExpectedStatus'>): number;
}
export { AbstractCommand };
//# sourceMappingURL=abstract-command.d.ts.map