/**
 * Copyright Microsoft Corporation. All rights reserved.
 *
 * 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 type { ConfigLocation, FullConfigInternal } from './config';
import type { ReporterDescription, TestInfoError, TestStatus } from '../../types/test';
import type { SerializedCompilationCache } from '../transform/compilationCache';
export type ConfigCLIOverrides = {
    debug?: 'inspector' | 'cli';
    failOnFlakyTests?: boolean;
    forbidOnly?: boolean;
    fullyParallel?: boolean;
    globalTimeout?: number;
    maxFailures?: number;
    outputDir?: string;
    pause?: boolean;
    quiet?: boolean;
    repeatEach?: number;
    retries?: number;
    reporter?: ReporterDescription[];
    shard?: {
        current: number;
        total: number;
    };
    timeout?: number;
    tsconfig?: string;
    ignoreSnapshots?: boolean;
    updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
    updateSourceMethod?: 'overwrite' | 'patch' | '3way';
    workers?: number | string;
    projects?: {
        name: string;
        use?: any;
    }[];
    use?: any;
};
export type SerializedConfig = {
    location: ConfigLocation;
    configCLIOverrides: ConfigCLIOverrides;
    compilationCache?: SerializedCompilationCache;
    metadata?: string;
};
export type ProcessInitParams = {
    timeOrigin: number;
    processName: string;
};
export type WorkerInitParams = {
    workerIndex: number;
    parallelIndex: number;
    repeatEachIndex: number;
    projectId: string;
    config: SerializedConfig;
    artifactsDir: string;
    pauseOnError: boolean;
    pauseAtEnd: boolean;
};
export type TestBeginPayload = {
    testId: string;
    startWallTime: number;
};
export type AttachmentPayload = {
    testId: string;
    name: string;
    path?: string;
    body?: string;
    contentType: string;
    stepId?: string;
};
export type TestInfoErrorPayload = {
    message?: string;
    stack?: string;
    value?: string;
    cause?: TestInfoErrorPayload;
};
export type TestPausedPayload = {
    testId: string;
    errors: TestInfoErrorPayload[];
    status: TestStatus;
};
export type ResumePayload = {};
export type CustomMessageRequestPayload = {
    testId: string;
    request: any;
};
export type CustomMessageResponsePayload = {
    response: any;
    error?: TestInfoErrorPayload;
};
export type TestEndPayload = {
    testId: string;
    duration: number;
    status: TestStatus;
    errors: TestInfoErrorPayload[];
    hasNonRetriableError: boolean;
    expectedStatus: TestStatus;
    annotations: {
        type: string;
        description?: string;
    }[];
    timeout: number;
};
export type StepBeginPayload = {
    testId: string;
    stepId: string;
    parentStepId: string | undefined;
    title: string;
    category: string;
    wallTime: number;
    location?: {
        file: string;
        line: number;
        column: number;
    };
};
export type StepEndPayload = {
    testId: string;
    stepId: string;
    wallTime: number;
    error?: TestInfoErrorPayload;
    suggestedRebaseline?: string;
    annotations: {
        type: string;
        description?: string;
    }[];
};
export type TestEntry = {
    testId: string;
    retry: number;
};
export type RunPayload = {
    file: string;
    entries: TestEntry[];
};
export type DonePayload = {
    fatalErrors: TestInfoErrorPayload[];
    skipTestsDueToSetupFailure: string[];
    fatalUnknownTestIds?: string[];
    stoppedDueToUnhandledErrorInTestFail?: boolean;
};
export type TestOutputPayload = {
    text?: string;
    buffer?: string;
};
export type TeardownErrorsPayload = {
    fatalErrors: TestInfoErrorPayload[];
};
export type EnvProducedPayload = [string, string | null][];
export declare function serializeConfig(config: FullConfigInternal, passCompilationCache: boolean): SerializedConfig;
export declare function stdioChunkToParams(chunk: Uint8Array | string): TestOutputPayload;
export declare function toTestInfoErrorPayload(error: TestInfoError): TestInfoErrorPayload;
//# sourceMappingURL=ipc.d.ts.map