/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Artifact } from '../artifact';
import type { APIRequestContext } from '../fetch';
import type { BrowserContext } from '../browserContext';
import type { HarTracerDelegate } from './harTracer';
import type { Page } from '../page';
import type { NameValue } from '@isomorphic/types';
import type * as channels from '@protocol/channels';
import type * as har from '@trace/har';
export declare class HarRecorder implements HarTracerDelegate {
    private _context;
    private _fs;
    private _harFilePath;
    private _resourcesDir;
    private _isFlushed;
    private _tracer;
    private _entries;
    private _writtenContentEntries;
    constructor(context: BrowserContext | APIRequestContext, fallbackDir: string, harId: string, page: Page | null, options: channels.RecordHarOptions);
    onEntryStarted(entry: har.Entry): void;
    onEntryFinished(entry: har.Entry): void;
    onContentBlob(sha1: string, buffer: Buffer): void;
    private _flush;
    flush(): Promise<void>;
    export(mode: 'archive' | 'entries'): Promise<{
        entries?: NameValue[];
        artifact?: Artifact;
    }>;
}
//# sourceMappingURL=harRecorder.d.ts.map