/// <reference types="node" />
import { Readable, Writable } from "stream";
import { URL as URL$1, URLSearchParams } from "node:url";
import { Duplex, Readable as Readable$1, Writable as Writable$1 } from "node:stream";
import { EventEmitter } from "node:events";
import { Blob, File } from "node:buffer";
import { ConnectionOptions, TLSSocket } from "node:tls";
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from "node:net";

//#region \0rolldown/runtime.js
//#endregion
//#region src/tunnel/tunnel.d.ts
interface TunnelInfo {
  host: string;
  id: string;
  privateKey: string;
}
//#endregion
//#region src/utils/internal.d.ts
type RecursivePartial<T> = { [P in keyof T]?: RecursivePartial<T[P]> };
//#endregion
//#region src/errors.d.ts
type NonCriticalCiErrorCode = 'NO_TESTS_TO_RUN' | 'MISSING_TESTS' | 'UNAUTHORIZED_TESTS';
type CriticalCiErrorCode = 'AUTHORIZATION_ERROR' | 'INVALID_CONFIG' | 'MISSING_API_KEY' | 'MISSING_APP_KEY' | 'POLL_RESULTS_FAILED' | 'BATCH_TIMEOUT_RUNAWAY' | 'TOO_MANY_TESTS_TO_TRIGGER' | 'TRIGGER_TESTS_FAILED' | 'TUNNEL_START_FAILED' | 'TUNNEL_NOT_SUPPORTED' | 'UNAVAILABLE_TEST_CONFIG' | 'UNAVAILABLE_TUNNEL_CONFIG' | 'UPLOAD_MOBILE_APPLICATION_TESTS_FAILED' | 'MISSING_MOBILE_APPLICATION_PATH' | 'MISSING_MOBILE_APPLICATION_ID' | 'MISSING_MOBILE_VERSION_NAME' | 'INVALID_MOBILE_APP' | 'INVALID_MOBILE_APP_UPLOAD_PARAMETERS' | 'MOBILE_APP_UPLOAD_TIMEOUT' | 'UNKNOWN_MOBILE_APP_UPLOAD_FAILURE' | 'LTD_MULTILOCATORS_UPDATE_FAILED';
type CiErrorCode = NonCriticalCiErrorCode | CriticalCiErrorCode;
declare class CiError extends Error {
  code: CiErrorCode;
  constructor(code: CiErrorCode, message?: string);
  toJson(): {
    code: CiErrorCode;
    message: string;
  };
}
declare class CriticalError extends CiError {
  code: CriticalCiErrorCode;
  constructor(code: CriticalCiErrorCode, message?: string);
}
declare namespace public_d_exports {
  export { ExitReason, InitialSummary, PASSED_RESULT_OUTCOMES, PUBLIC_ID_REGEX, ParsedPublicId, ResultOutcome, ciTriggerApp, createInitialSummary, fetchTest, filterTestPlan, getAppBaseURL, getBatchUrl, getDatadogHost, getExecutionRule, getExitReason, getFilePathRelativeToRepo, getOrgSettings, getReporter, getResultOutcome, getResultUrl, getStrictestExecutionRule, getSuites, getTestOverridesCount, isDeviceIdSet, isResultSkippedBySelectiveRerun, isTestSupportedByTunnel, makeTestPayload, normalizePublicId, parsePublicIdWithVersion, pluralize, readableOperation, renderResults, reportCiError, reportExitLogs, retry, setCiTriggerApp, sortResultsByOutcome, toExitCode };
}
declare const PUBLIC_ID_REGEX: RegExp;
declare const readableOperation: { [key in Operator]: string };
declare let ciTriggerApp: string;
declare const makeTestPayload: (test: Test, triggerConfig: TriggerConfig, publicId: string) => TestPayload;
declare const getTestOverridesCount: (testOverrides: UserConfigOverride) => number;
declare const setCiTriggerApp: (source: string) => void;
declare const getExecutionRule: (test?: Test, configOverride?: UserConfigOverride) => ExecutionRule;
declare const getStrictestExecutionRule: (configRule: ExecutionRule, testRule?: ExecutionRule) => ExecutionRule;
declare const isTestSupportedByTunnel: (test: Test) => boolean | undefined;
declare const enum ResultOutcome {
  Passed = "passed",
  PreviouslyPassed = "previously-passed",
  PassedNonBlocking = "passed-non-blocking",
  Failed = "failed",
  FailedNonBlocking = "failed-non-blocking"
}
declare const PASSED_RESULT_OUTCOMES: ResultOutcome[];
declare const getResultOutcome: (result: Result) => ResultOutcome;
declare const getSuites: (pattern: string, reporter: MainReporter) => Promise<Suite[]>;
declare const getFilePathRelativeToRepo: (filePath: string) => Promise<string>;
declare const normalizePublicId: (id: string) => string | undefined;
interface ParsedPublicId {
  publicId: string;
  version?: number;
}
declare const parsePublicIdWithVersion: (id: string) => ParsedPublicId | undefined;
declare const getOrgSettings: (reporter: MainReporter, config: SyntheticsCIConfig) => Promise<SyntheticsOrgSettings | undefined>;
declare const isResultSkippedBySelectiveRerun: (result: Result) => result is ResultSkippedBySelectiveRerun;
type InitialSummary = Omit<Summary, 'batchId'>;
declare const createInitialSummary: () => InitialSummary;
declare const getReporter: (reporters: Reporter[]) => MainReporter;
declare const isDeviceIdSet: (result: Result) => result is Required<Result>;
declare const fetchTest: (publicId: string, config: SyntheticsCIConfig) => Promise<Test>;
declare const retry: <T, E extends Error>(func: () => Promise<T>, shouldRetryAfterWait: (retries: number, error: E) => number | undefined) => Promise<T>;
declare const getAppBaseURL: ({
  datadogSite,
  subdomain
}: {
  datadogSite: string;
  subdomain: string;
}) => string;
declare const getBatchUrl: (baseUrl: string, batchId: string) => string;
declare const getResultUrl: (baseUrl: string, test: Test, resultId: string, batchId: string) => string;
/**
 * Sort results with the following rules:
 * - Passed results come first
 * - Then non-blocking failed results
 * - And finally failed results
 */
declare const sortResultsByOutcome: () => (r1: Result, r2: Result) => number;
declare const renderResults: ({
  config,
  orgSettings,
  reporter,
  results,
  startTime,
  summary
}: {
  config: RunTestsCommandConfig;
  orgSettings: SyntheticsOrgSettings | undefined;
  reporter: MainReporter;
  results: Result[];
  startTime: number;
  summary: Summary;
}) => void;
declare const reportExitLogs: (reporter: MainReporter, config: Pick<RunTestsCommandConfig, 'failOnTimeout' | 'failOnCriticalErrors'>, {
  results,
  error
}: {
  results?: Result[] | undefined;
  error?: unknown;
}) => void;
declare const getExitReason: (config: Pick<RunTestsCommandConfig, 'failOnCriticalErrors' | 'failOnMissingTests'>, {
  results,
  error
}: {
  results?: Result[] | undefined;
  error?: unknown;
}) => "failing-tests" | "missing-tests" | "critical-error" | "passed";
type ExitReason = ReturnType<typeof getExitReason>;
declare const toExitCode: (reason: ExitReason) => 1 | 0;
declare const getDatadogHost: (hostConfig: {
  apiVersion: 'v1' | 'v2' | 'unstable';
  config: APIHelperConfig;
  useIntake: boolean;
}) => string;
declare const pluralize: (word: string, count: number) => string;
declare const reportCiError: (error: CiError, reporter: MainReporter) => void;
declare const filterTestPlan: (testPlan: TestPlan, initialSummary: InitialSummary, predicate: (item: TestPlanItem) => boolean) => {
  testPlan: TestPlan;
  initialSummary: InitialSummary;
};
//#endregion
//#region ../../node_modules/undici/types/utility.d.ts
type AutocompletePrimitiveBaseType<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : never;
type Autocomplete<T> = T | (AutocompletePrimitiveBaseType<T> & Record<never, never>);
//#endregion
//#region ../../node_modules/undici/types/header.d.ts
/**
 * The header type declaration of `undici`.
 */
type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
type HeaderNames = Autocomplete<'Accept' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'Alt-Svc' | 'Alt-Used' | 'Authorization' | 'Cache-Control' | 'Clear-Site-Data' | 'Connection' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'Device-Memory' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Forwarded' | 'From' | 'Host' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Unmodified-Since' | 'Keep-Alive' | 'Last-Modified' | 'Link' | 'Location' | 'Max-Forwards' | 'Origin' | 'Permissions-Policy' | 'Priority' | 'Proxy-Authenticate' | 'Proxy-Authorization' | 'Range' | 'Referer' | 'Referrer-Policy' | 'Retry-After' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-Purpose' | 'Sec-WebSocket-Accept' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'SourceMap' | 'Strict-Transport-Security' | 'TE' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Upgrade-Insecure-Requests' | 'User-Agent' | 'Vary' | 'Via' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options'>;
type IANARegisteredMimeType = Autocomplete<'audio/aac' | 'video/x-msvideo' | 'image/avif' | 'video/av1' | 'application/octet-stream' | 'image/bmp' | 'text/css' | 'text/csv' | 'application/vnd.ms-fontobject' | 'application/epub+zip' | 'image/gif' | 'application/gzip' | 'text/html' | 'image/x-icon' | 'text/calendar' | 'image/jpeg' | 'text/javascript' | 'application/json' | 'application/ld+json' | 'audio/x-midi' | 'audio/mpeg' | 'video/mp4' | 'video/mpeg' | 'audio/ogg' | 'video/ogg' | 'application/ogg' | 'audio/opus' | 'font/otf' | 'application/pdf' | 'image/png' | 'application/rtf' | 'image/svg+xml' | 'image/tiff' | 'video/mp2t' | 'font/ttf' | 'text/plain' | 'application/wasm' | 'video/webm' | 'audio/webm' | 'image/webp' | 'font/woff' | 'font/woff2' | 'application/xhtml+xml' | 'application/xml' | 'application/zip' | 'video/3gpp' | 'video/3gpp2' | 'model/gltf+json' | 'model/gltf-binary'>;
type KnownHeaderValues = {
  'content-type': IANARegisteredMimeType;
};
type HeaderRecord = { [K in HeaderNames | Lowercase<HeaderNames>]?: Lowercase<K> extends keyof KnownHeaderValues ? KnownHeaderValues[Lowercase<K>] : string };
//#endregion
//#region ../../node_modules/undici/types/readable.d.ts
declare class BodyReadable extends Readable$1 {
  constructor(opts: {
    resume: (this: Readable$1, size: number) => void | null;
    abort: () => void | null;
    contentType?: string;
    contentLength?: number;
    highWaterMark?: number;
  });
  /** Consumes and returns the body as a string
   *  https://fetch.spec.whatwg.org/#dom-body-text
   */
  text(): Promise<string>;
  /** Consumes and returns the body as a JavaScript Object
   *  https://fetch.spec.whatwg.org/#dom-body-json
   */
  json(): Promise<unknown>;
  /** Consumes and returns the body as a Blob
   *  https://fetch.spec.whatwg.org/#dom-body-blob
   */
  blob(): Promise<Blob>;
  /** Consumes and returns the body as an Uint8Array
   *  https://fetch.spec.whatwg.org/#dom-body-bytes
   */
  bytes(): Promise<Uint8Array>;
  /** Consumes and returns the body as an ArrayBuffer
   *  https://fetch.spec.whatwg.org/#dom-body-arraybuffer
   */
  arrayBuffer(): Promise<ArrayBuffer>;
  /** Not implemented
   *
   *  https://fetch.spec.whatwg.org/#dom-body-formdata
   */
  formData(): Promise<never>;
  /** Returns true if the body is not null and the body has been consumed
   *
   *  Otherwise, returns false
   *
   * https://fetch.spec.whatwg.org/#dom-body-bodyused
   */
  readonly bodyUsed: boolean;
  /**
   * If body is null, it should return null as the body
   *
   *  If body is not null, should return the body as a ReadableStream
   *
   *  https://fetch.spec.whatwg.org/#dom-body-body
   */
  readonly body: never | undefined;
  /** Dumps the response body by reading `limit` number of bytes.
   * @param opts.limit Number of bytes to read (optional) - Default: 131072
   * @param opts.signal AbortSignal to cancel the operation (optional)
   */
  dump(opts?: {
    limit: number;
    signal?: AbortSignal;
  }): Promise<void>;
}
//#endregion
//#region ../../node_modules/undici/types/fetch.d.ts
type BodyInit = ArrayBuffer | AsyncIterable<Uint8Array> | Blob | FormData | Iterable<Uint8Array> | NodeJS.ArrayBufferView | URLSearchParams | null | string;
interface SpecIterator<T, TReturn = any, TNext = undefined> {
  next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
}
interface SpecIteratorObject<T, TReturn = undefined, TNext = unknown> extends SpecIterator<T, TReturn, TNext> {
  [Symbol.iterator](): SpecIteratorObject<T, TReturn, TNext>;
  map<U>(callbackfn: (value: T, index: number) => U): SpecIteratorObject<U>;
  filter<S extends T>(predicate: (value: T, index: number) => value is S): SpecIteratorObject<S>;
  filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject<T>;
  take(limit: number): SpecIteratorObject<T>;
  drop(count: number): SpecIteratorObject<T>;
  flatMap<U>(callbackfn: (value: T, index: number) => Iterator<U> | Iterable<U>): SpecIteratorObject<U>;
  reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
  reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
  reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
  toArray(): T[];
  forEach(callbackfn: (value: T, index: number) => void): void;
  some(predicate: (value: T, index: number) => unknown): boolean;
  every(predicate: (value: T, index: number) => unknown): boolean;
  find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
  find(predicate: (value: T, index: number) => unknown): T | undefined;
  readonly [Symbol.toStringTag]: string;
}
interface SpecIterableIterator<T> extends SpecIteratorObject<T> {
  [Symbol.iterator](): SpecIterableIterator<T>;
}
interface SpecIterable<T> {
  [Symbol.iterator](): SpecIterableIterator<T>;
}
type HeadersInit = [string, string][] | HeaderRecord | Headers;
declare class Headers implements SpecIterable<[string, string]> {
  constructor(init?: HeadersInit);
  readonly append: (name: string, value: string) => void;
  readonly delete: (name: string) => void;
  readonly get: (name: string) => string | null;
  readonly has: (name: string) => boolean;
  readonly set: (name: string, value: string) => void;
  readonly getSetCookie: () => string[];
  readonly forEach: (callbackfn: (value: string, key: string, iterable: Headers) => void, thisArg?: unknown) => void;
  readonly keys: () => SpecIterableIterator<string>;
  readonly values: () => SpecIterableIterator<string>;
  readonly entries: () => SpecIterableIterator<[string, string]>;
  readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]>;
}
//#endregion
//#region ../../node_modules/undici/types/formdata.d.ts
declare module 'node:buffer' {
  interface File {
    readonly [Symbol.toStringTag]: string;
  }
}
/**
 * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
 */
declare type FormDataEntryValue = string | File;
/**
 * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
 */
declare class FormData {
  /**
   * Appends a new value onto an existing key inside a FormData object,
   * or adds the key if it does not already exist.
   *
   * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
   *
   * @param name The name of the field whose data is contained in `value`.
   * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
    or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
   * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
   */
  append(name: string, value: unknown, fileName?: string): void;
  /**
   * Set a new value for an existing key inside FormData,
   * or add the new field if it does not already exist.
   *
   * @param name The name of the field whose data is contained in `value`.
   * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
    or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
   * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
   *
   */
  set(name: string, value: unknown, fileName?: string): void;
  /**
   * Returns the first value associated with a given key from within a `FormData` object.
   * If you expect multiple values and want all of them, use the `getAll()` method instead.
   *
   * @param {string} name A name of the value you want to retrieve.
   *
   * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
   */
  get(name: string): FormDataEntryValue | null;
  /**
   * Returns all the values associated with a given key from within a `FormData` object.
   *
   * @param {string} name A name of the value you want to retrieve.
   *
   * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
   */
  getAll(name: string): FormDataEntryValue[];
  /**
   * Returns a boolean stating whether a `FormData` object contains a certain key.
   *
   * @param name A string representing the name of the key you want to test for.
   *
   * @return A boolean value.
   */
  has(name: string): boolean;
  /**
   * Deletes a key and its value(s) from a `FormData` object.
   *
   * @param name The name of the key you want to delete.
   */
  delete(name: string): void;
  /**
   * Executes given callback function for each field of the FormData instance
   */
  forEach: (callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, thisArg?: unknown) => void;
  /**
   * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
   * Each key is a `string`.
   */
  keys: () => SpecIterableIterator<string>;
  /**
   * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
   * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
   */
  values: () => SpecIterableIterator<FormDataEntryValue>;
  /**
   * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
   * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
   */
  entries: () => SpecIterableIterator<[string, FormDataEntryValue]>;
  /**
   * An alias for FormData#entries()
   */
  [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>;
  readonly [Symbol.toStringTag]: string;
}
//#endregion
//#region ../../node_modules/undici/types/connector.d.ts
declare function buildConnector(options?: buildConnector.BuildOptions): buildConnector.connector;
declare namespace buildConnector {
  export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
    allowH2?: boolean;
    maxCachedSessions?: number | null;
    socketPath?: string | null;
    timeout?: number | null;
    port?: number;
    keepAlive?: boolean | null;
    keepAliveInitialDelay?: number | null;
    typeOfService?: number | null;
  };
  export interface Options {
    hostname: string;
    host?: string;
    protocol: string;
    port: string;
    servername?: string;
    localAddress?: string | null;
    socketPath?: string | null;
    httpSocket?: Socket;
  }
  export type Callback = (...args: CallbackArgs) => void;
  type CallbackArgs = [null, Socket | TLSSocket] | [Error, null];
  export interface connector {
    (options: buildConnector.Options, callback: buildConnector.Callback): void;
  }
}
//#endregion
//#region ../../node_modules/undici/types/client-stats.d.ts
declare class ClientStats {
  constructor(pool: Client);
  /** If socket has open connection. */
  connected: boolean;
  /** Number of open socket connections in this client that do not have an active request. */
  pending: number;
  /** Number of currently active requests of this client. */
  running: number;
  /** Number of active, pending, or queued requests of this client. */
  size: number;
}
//#endregion
//#region ../../node_modules/undici/types/client.d.ts
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
/**
 * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
 */
declare class Client extends Dispatcher {
  constructor(url: string | URL$1, options?: Client.Options);
  /** Property to get and set the pipelining factor. */
  pipelining: number;
  /** `true` after `client.close()` has been called. */
  closed: boolean;
  /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
  destroyed: boolean;
  /** Aggregate stats for a Client. */
  readonly stats: ClientStats; // Override dispatcher APIs.
  override connect(options: ClientConnectOptions): Promise<Dispatcher.ConnectData>;
  override connect(options: ClientConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
}
declare namespace Client {
  export interface OptionsInterceptors {
    Client: readonly Dispatcher.DispatchInterceptor[];
  }
  export interface Options {
    /** TODO */
    interceptors?: OptionsInterceptors;
    /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
    maxHeaderSize?: number;
    /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
    headersTimeout?: number;
    /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
    socketTimeout?: never;
    /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
    requestTimeout?: never;
    /** TODO */
    connectTimeout?: number;
    /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
    bodyTimeout?: number;
    /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
    idleTimeout?: never;
    /** @deprecated unsupported keepAlive, use pipelining=0 instead */
    keepAlive?: never;
    /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
    keepAliveTimeout?: number;
    /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
    maxKeepAliveTimeout?: never;
    /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
    keepAliveMaxTimeout?: number;
    /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
    keepAliveTimeoutThreshold?: number;
    /** TODO */
    socketPath?: string;
    /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
    pipelining?: number;
    /** @deprecated use the connect option instead */
    tls?: never;
    /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
    strictContentLength?: boolean;
    /** TODO */
    maxCachedSessions?: number;
    /** TODO */
    connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
    /** TODO */
    maxRequestsPerClient?: number;
    /** TODO */
    localAddress?: string;
    /** Max response body size in bytes, -1 is disabled */
    maxResponseSize?: number;
    /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
    autoSelectFamily?: boolean;
    /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
    autoSelectFamilyAttemptTimeout?: number;
    /**
     * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
     * @default false
     */
    allowH2?: boolean;
    /**
     * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
     * @default 100
     */
    maxConcurrentStreams?: number;
    /**
     * @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE).
     * @default 262144
     */
    initialWindowSize?: number;
    /**
     * @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize).
     * @default 524288
     */
    connectionWindowSize?: number;
    /**
     * @description Time interval between PING frames dispatch
     * @default 60000
     */
    pingInterval?: number;
  }
  export interface SocketInfo {
    localAddress?: string;
    localPort?: number;
    remoteAddress?: string;
    remotePort?: number;
    remoteFamily?: string;
    timeout?: number;
    bytesWritten?: number;
    bytesRead?: number;
  }
}
//#endregion
//#region ../../node_modules/undici/types/errors.d.ts
declare namespace Errors {
  export class UndiciError extends Error {
    name: string;
    code: string;
  }
  /** Connect timeout error. */
  export class ConnectTimeoutError extends UndiciError {
    name: 'ConnectTimeoutError';
    code: 'UND_ERR_CONNECT_TIMEOUT';
  }
  /** A header exceeds the `headersTimeout` option. */
  export class HeadersTimeoutError extends UndiciError {
    name: 'HeadersTimeoutError';
    code: 'UND_ERR_HEADERS_TIMEOUT';
  }
  /** Headers overflow error. */
  export class HeadersOverflowError extends UndiciError {
    name: 'HeadersOverflowError';
    code: 'UND_ERR_HEADERS_OVERFLOW';
  }
  /** A body exceeds the `bodyTimeout` option. */
  export class BodyTimeoutError extends UndiciError {
    name: 'BodyTimeoutError';
    code: 'UND_ERR_BODY_TIMEOUT';
  }
  export class ResponseError extends UndiciError {
    constructor(message: string, code: number, options: {
      headers?: IncomingHttpHeaders | string[] | null;
      body?: null | Record<string, any> | string;
    });
    name: 'ResponseError';
    code: 'UND_ERR_RESPONSE';
    statusCode: number;
    body: null | Record<string, any> | string;
    headers: IncomingHttpHeaders | string[] | null;
  }
  /** Passed an invalid argument. */
  export class InvalidArgumentError extends UndiciError {
    name: 'InvalidArgumentError';
    code: 'UND_ERR_INVALID_ARG';
  }
  /** Returned an invalid value. */
  export class InvalidReturnValueError extends UndiciError {
    name: 'InvalidReturnValueError';
    code: 'UND_ERR_INVALID_RETURN_VALUE';
  }
  /** The request has been aborted by the user. */
  export class RequestAbortedError extends UndiciError {
    name: 'AbortError';
    code: 'UND_ERR_ABORTED';
  }
  /** Expected error with reason. */
  export class InformationalError extends UndiciError {
    name: 'InformationalError';
    code: 'UND_ERR_INFO';
  }
  /** Request body length does not match content-length header. */
  export class RequestContentLengthMismatchError extends UndiciError {
    name: 'RequestContentLengthMismatchError';
    code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
  }
  /** Response body length does not match content-length header. */
  export class ResponseContentLengthMismatchError extends UndiciError {
    name: 'ResponseContentLengthMismatchError';
    code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
  }
  /** Trying to use a destroyed client. */
  export class ClientDestroyedError extends UndiciError {
    name: 'ClientDestroyedError';
    code: 'UND_ERR_DESTROYED';
  }
  /** Trying to use a closed client. */
  export class ClientClosedError extends UndiciError {
    name: 'ClientClosedError';
    code: 'UND_ERR_CLOSED';
  }
  /** There is an error with the socket. */
  export class SocketError extends UndiciError {
    name: 'SocketError';
    code: 'UND_ERR_SOCKET';
    socket: Client.SocketInfo | null;
  }
  /** Encountered unsupported functionality. */
  export class NotSupportedError extends UndiciError {
    name: 'NotSupportedError';
    code: 'UND_ERR_NOT_SUPPORTED';
  }
  /** No upstream has been added to the BalancedPool. */
  export class BalancedPoolMissingUpstreamError extends UndiciError {
    name: 'MissingUpstreamError';
    code: 'UND_ERR_BPL_MISSING_UPSTREAM';
  }
  export class HTTPParserError extends UndiciError {
    name: 'HTTPParserError';
    code: string;
  }
  /** The response exceed the length allowed. */
  export class ResponseExceededMaxSizeError extends UndiciError {
    name: 'ResponseExceededMaxSizeError';
    code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
  }
  export class RequestRetryError extends UndiciError {
    constructor(message: string, statusCode: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string);
    name: 'RequestRetryError';
    code: 'UND_ERR_REQ_RETRY';
    statusCode: number;
    data: {
      count: number;
    };
    headers: Record<string, string | string[]>;
  }
  export class SecureProxyConnectionError extends UndiciError {
    constructor(cause?: Error, message?: string, options?: Record<any, any>);
    name: 'SecureProxyConnectionError';
    code: 'UND_ERR_PRX_TLS';
  }
  export class MaxOriginsReachedError extends UndiciError {
    name: 'MaxOriginsReachedError';
    code: 'UND_ERR_MAX_ORIGINS_REACHED';
  }
  /** SOCKS5 proxy related error. */
  export class Socks5ProxyError extends UndiciError {
    constructor(message?: string, code?: string);
    name: 'Socks5ProxyError';
    code: string;
  }
  /** WebSocket decompressed message exceeded maximum size. */
  export class MessageSizeExceededError extends UndiciError {
    name: 'MessageSizeExceededError';
    code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED';
  }
}
//#endregion
//#region ../../node_modules/undici/types/dispatcher.d.ts
type AbortSignal$1 = unknown;
type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
/** Dispatcher is the core API used to dispatch requests. */
declare class Dispatcher extends EventEmitter {
  /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
  dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
  /** Starts two-way communications with the requested resource. */
  connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void;
  connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>;
  /** Compose a chain of dispatchers */
  compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
  compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
  /** Performs an HTTP request. */
  request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void;
  request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>;
  /** For easy use with `stream.pipeline`. */
  pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex;
  /** A faster version of `Dispatcher.request`. */
  stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void;
  stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>;
  /** Upgrade to a different protocol. */
  upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void;
  upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>;
  /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
  close(callback: () => void): void;
  close(): Promise<void>;
  /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
  destroy(err: Error | null, callback: () => void): void;
  destroy(callback: () => void): void;
  destroy(err: Error | null): Promise<void>;
  destroy(): Promise<void>;
  on(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  on(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  on(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  on(eventName: 'drain', callback: (origin: URL$1) => void): this;
  once(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  once(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  once(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  once(eventName: 'drain', callback: (origin: URL$1) => void): this;
  off(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  off(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  off(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  off(eventName: 'drain', callback: (origin: URL$1) => void): this;
  addListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  addListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  addListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  addListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
  removeListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  removeListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  removeListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  removeListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
  prependListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  prependListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  prependListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  prependListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
  prependOnceListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
  prependOnceListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  prependOnceListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
  prependOnceListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
  listeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
  listeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
  listeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
  listeners(eventName: 'drain'): ((origin: URL$1) => void)[];
  rawListeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
  rawListeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
  rawListeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
  rawListeners(eventName: 'drain'): ((origin: URL$1) => void)[];
  emit(eventName: 'connect', origin: URL$1, targets: readonly Dispatcher[]): boolean;
  emit(eventName: 'disconnect', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
  emit(eventName: 'connectionError', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
  emit(eventName: 'drain', origin: URL$1): boolean;
}
declare namespace Dispatcher {
  export interface ComposedDispatcher extends Dispatcher {}
  export type Dispatch = Dispatcher['dispatch'];
  export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch;
  export interface DispatchOptions {
    origin?: string | URL$1;
    path: string;
    method: HttpMethod;
    /** Default: `null` */
    body?: string | Buffer | Uint8Array | Readable$1 | null | FormData;
    /** Default: `null` */
    headers?: UndiciHeaders;
    /** Query string params to be embedded in the request URL. Default: `null` */
    query?: Record<string, any>;
    /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
    idempotent?: boolean;
    /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
    blocking?: boolean;
    /** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. Default: `0` */
    typeOfService?: number | null;
    /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
    upgrade?: boolean | string | null;
    /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
    headersTimeout?: number | null;
    /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
    bodyTimeout?: number | null;
    /** Whether the request should stablish a keep-alive or not. Default `false` */
    reset?: boolean;
    /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
    throwOnError?: boolean;
    /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
    expectContinue?: boolean;
  }
  export interface ConnectOptions<TOpaque = null> {
    origin: string | URL$1;
    path: string;
    /** Default: `null` */
    headers?: UndiciHeaders;
    /** Default: `null` */
    signal?: AbortSignal$1 | EventEmitter | null;
    /** This argument parameter is passed through to `ConnectData` */
    opaque?: TOpaque;
    /** Default: `null` */
    responseHeaders?: 'raw' | null;
  }
  export interface RequestOptions<TOpaque = null> extends DispatchOptions {
    /** Default: `null` */
    opaque?: TOpaque;
    /** Default: `null` */
    signal?: AbortSignal$1 | EventEmitter | null;
    /** Default: `null` */
    onInfo?: (info: {
      statusCode: number;
      headers: Record<string, string | string[]>;
    }) => void;
    /** Default: `null` */
    responseHeaders?: 'raw' | null;
    /** Default: `64 KiB` */
    highWaterMark?: number;
  }
  export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
    /** `true` if the `handler` will return an object stream. Default: `false` */
    objectMode?: boolean;
  }
  export interface UpgradeOptions {
    path: string;
    /** Default: `'GET'` */
    method?: string;
    /** Default: `null` */
    headers?: UndiciHeaders;
    /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
    protocol?: string;
    /** Default: `null` */
    signal?: AbortSignal$1 | EventEmitter | null;
    /** Default: `null` */
    responseHeaders?: 'raw' | null;
  }
  export interface ConnectData<TOpaque = null> {
    statusCode: number;
    headers: IncomingHttpHeaders;
    socket: Duplex;
    opaque: TOpaque;
  }
  export interface ResponseData<TOpaque = null> {
    statusCode: number;
    statusText: string;
    headers: IncomingHttpHeaders;
    body: BodyReadable & BodyMixin;
    trailers: Record<string, string>;
    opaque: TOpaque;
    context: object;
  }
  export interface PipelineHandlerData<TOpaque = null> {
    statusCode: number;
    headers: IncomingHttpHeaders;
    opaque: TOpaque;
    body: BodyReadable;
    context: object;
  }
  export interface StreamData<TOpaque = null> {
    opaque: TOpaque;
    trailers: Record<string, string>;
  }
  export interface UpgradeData<TOpaque = null> {
    headers: IncomingHttpHeaders;
    socket: Duplex;
    opaque: TOpaque;
  }
  export interface StreamFactoryData<TOpaque = null> {
    statusCode: number;
    headers: IncomingHttpHeaders;
    opaque: TOpaque;
    context: object;
  }
  export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable$1;
  export interface DispatchController {
    get aborted(): boolean;
    get paused(): boolean;
    get reason(): Error | null;
    abort(reason: Error): void;
    pause(): void;
    resume(): void;
  }
  export interface DispatchHandler {
    onRequestStart?(controller: DispatchController, context: any): void;
    onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
    onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
    onResponseData?(controller: DispatchController, chunk: Buffer): void;
    onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
    onResponseError?(controller: DispatchController, error: Error): void;
    /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
    /** @deprecated */
    onConnect?(abort: (err?: Error) => void): void;
    /** Invoked when an error has occurred. */
    /** @deprecated */
    onError?(err: Error): void;
    /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
    /** @deprecated */
    onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
    /** Invoked when response is received, before headers have been read. **/
    /** @deprecated */
    onResponseStarted?(): void;
    /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
    /** @deprecated */
    onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
    /** Invoked when response payload data is received. */
    /** @deprecated */
    onData?(chunk: Buffer): boolean;
    /** Invoked when response payload and trailers have been received and the request has completed. */
    /** @deprecated */
    onComplete?(trailers: string[] | null): void;
    /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
    /** @deprecated */
    onBodySent?(chunkSize: number, totalBytesSent: number): void;
  }
  export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable$1;
  export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>;
  /**
   * @link https://fetch.spec.whatwg.org/#body-mixin
   */
  interface BodyMixin {
    readonly body?: never;
    readonly bodyUsed: boolean;
    arrayBuffer(): Promise<ArrayBuffer>;
    blob(): Promise<Blob>;
    bytes(): Promise<Uint8Array>;
    formData(): Promise<never>;
    json(): Promise<unknown>;
    text(): Promise<string>;
  }
  export interface DispatchInterceptor {
    (dispatch: Dispatch): Dispatch;
  }
}
//#endregion
//#region ../../node_modules/undici/types/mock-interceptor.d.ts
/** The scope associated with a mock dispatch. */
declare class MockScope<TData extends object = object> {
  constructor(mockDispatch: MockInterceptor.MockDispatch<TData>);
  /** Delay a reply by a set amount of time in ms. */
  delay(waitInMs: number): MockScope<TData>;
  /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */
  persist(): MockScope<TData>;
  /** Define a reply for a set amount of matching requests. */
  times(repeatTimes: number): MockScope<TData>;
}
/** The interceptor for a Mock. */
declare class MockInterceptor {
  constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]);
  /** Mock an undici request with the defined reply. */
  reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>;
  reply<TData extends object = object>(statusCode: number, data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>, responseOptions?: MockInterceptor.MockResponseOptions): MockScope<TData>;
  /** Mock an undici request by throwing the defined reply error. */
  replyWithError<TError extends Error = Error>(error: TError): MockScope;
  /** Set default reply headers on the interceptor for subsequent mocked replies. */
  defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor;
  /** Set default reply trailers on the interceptor for subsequent mocked replies. */
  defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor;
  /** Set automatically calculated content-length header on subsequent mocked replies. */
  replyContentLength(): MockInterceptor;
}
declare namespace MockInterceptor {
  /** MockInterceptor options. */
  export interface Options {
    /** Path to intercept on. */
    path: string | RegExp | ((path: string) => boolean);
    /** Method to intercept on. Defaults to GET. */
    method?: string | RegExp | ((method: string) => boolean);
    /** Body to intercept on. */
    body?: string | RegExp | ((body: string) => boolean);
    /** Headers to intercept on. */
    headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean);
    /** Query params to intercept on */
    query?: Record<string, any>;
  }
  export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options {
    times: number | null;
    persist: boolean;
    consumed: boolean;
    data: MockDispatchData<TData, TError>;
  }
  export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions {
    error: TError | null;
    statusCode?: number;
    data?: TData | string;
  }
  export interface MockResponseOptions {
    headers?: IncomingHttpHeaders;
    trailers?: Record<string, string>;
  }
  export interface MockResponseCallbackOptions {
    path: string;
    method: string;
    headers?: Headers | Record<string, string>;
    origin?: string;
    body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
  }
  export type MockResponseDataHandler<TData extends object = object> = (opts: MockResponseCallbackOptions) => TData | Buffer | string;
  export type MockReplyOptionsCallback<TData extends object = object> = (opts: MockResponseCallbackOptions) => {
    statusCode: number;
    data?: TData | Buffer | string;
    responseOptions?: MockResponseOptions;
  };
}
//#endregion
//#region ../../node_modules/typanion/lib/types.d.ts
declare type BoundCoercionFn = () => BoundCoercionFn;
declare type CoercionFn = (v: any) => BoundCoercionFn;
declare type Coercion = [string, BoundCoercionFn];
declare type LooseTest<U> = (value: U, test?: ValidationState) => boolean;
declare type ValidationState = {
  p?: string;
  errors?: string[];
  coercions?: Coercion[];
  coercion?: CoercionFn;
};
//#endregion
//#region ../../node_modules/clipanion/lib/format.d.ts
interface ColorFormat {
  header(str: string): string;
  bold(str: string): string;
  error(str: string): string;
  code(str: string): string;
}
//#endregion
//#region ../../node_modules/clipanion/lib/advanced/options/utils.d.ts
declare const isOptionSymbol: unique symbol;
//#endregion
//#region ../../node_modules/clipanion/lib/advanced/Cli.d.ts
/**
 * The base context of the CLI.
 *
 * All Contexts have to extend it.
 */
declare type BaseContext = {
  /**
   * Environment variables.
   *
   * @default
   * process.env
   */
  env: Record<string, string | undefined>;
  /**
   * The input stream of the CLI.
   *
   * @default
   * process.stdin
   */
  stdin: Readable;
  /**
   * The output stream of the CLI.
   *
   * @default
   * process.stdout
   */
  stdout: Writable;
  /**
   * The error stream of the CLI.
   *
   * @default
   * process.stderr
   */
  stderr: Writable;
  /**
   * Whether colors should be enabled.
   */
  colorDepth: number;
};
declare type CliOptions = Readonly<{
  /**
   * The label of the binary.
   *
   * Shown at the top of the usage information.
   */
  binaryLabel?: string;
  /**
   * The name of the binary.
   *
   * Included in the path and the examples of the definitions.
   */
  binaryName: string;
  /**
   * The version of the binary.
   *
   * Shown at the top of the usage information.
   */
  binaryVersion?: string;
  /**
   * If `true`, the Cli will hook into the process standard streams to catch
   * the output produced by console.log and redirect them into the context
   * streams. Note: stdin isn't captured at the moment.
   *
   * @default
   * false
   */
  enableCapture: boolean;
  /**
   * If `true`, the Cli will use colors in the output. If `false`, it won't.
   * If `undefined`, Clipanion will infer the correct value from the env.
   */
  enableColors?: boolean;
}>;
declare type MiniCli<Context extends BaseContext> = CliOptions & {
  /**
   * Returns an Array representing the definitions of all registered commands.
   */
  definitions(): Array<Definition>;
  /**
   * Formats errors using colors.
   *
   * @param error The error to format. If `error.name` is `'Error'`, it is replaced with `'Internal Error'`.
   * @param opts.command The command whose usage will be included in the formatted error.
   */
  error(error: Error, opts?: {
    command?: Command<Context> | null;
  }): string;
  /**
   * Returns a rich color format if colors are enabled, or a plain text format otherwise.
   *
   * @param colored Forcefully enable or disable colors.
   */
  format(colored?: boolean): ColorFormat;
  /**
   * Compiles a command and its arguments using the `CommandBuilder`.
   *
   * @param input An array containing the name of the command and its arguments
   *
   * @returns The compiled `Command`, with its properties populated with the arguments.
   */
  process(input: Array<string>, context?: Partial<Context>): Command<Context>;
  /**
   * Runs a command.
   *
   * @param input An array containing the name of the command and its arguments
   * @param context Overrides the Context of the main `Cli` instance
   *
   * @returns The exit code of the command
   */
  run(input: Array<string>, context?: Partial<Context>): Promise<number>;
  /**
   * Returns the usage of a command.
   *
   * @param command The `Command` whose usage will be returned or `null` to return the usage of all commands.
   * @param opts.detailed If `true`, the usage of a command will also include its description, details, and examples. Doesn't have any effect if `command` is `null` or doesn't have a `usage` property.
   * @param opts.prefix The prefix displayed before each command. Defaults to `$`.
   */
  usage(command?: CommandClass<Context> | Command<Context> | null, opts?: {
    detailed?: boolean;
    prefix?: string;
  }): string;
};
//#endregion
//#region ../../node_modules/clipanion/lib/advanced/Command.d.ts
/**
 * The usage of a Command.
 */
declare type Usage = {
  /**
   * The category of the command.
   *
   * Included in the detailed usage.
   */
  category?: string;
  /**
   * The short description of the command, formatted as Markdown.
   *
   * Included in the detailed usage.
   */
  description?: string;
  /**
   * The extended details of the command, formatted as Markdown.
   *
   * Included in the detailed usage.
   */
  details?: string;
  /**
   * Examples of the command represented as an Array of tuples.
   *
   * The first element of the tuple represents the description of the example.
   *
   * The second element of the tuple represents the command of the example.
   * If present, the leading `$0` is replaced with `cli.binaryName`.
   */
  examples?: Array<[string, string]>;
};
/**
 * The definition of a Command.
 */
declare type Definition = Usage & {
  /**
   * The path of the command, starting with `cli.binaryName`.
   */
  path: string;
  /**
   * The detailed usage of the command.
   */
  usage: string;
  /**
   * The various options registered on the command.
   */
  options: Array<{
    definition: string;
    description?: string;
    required: boolean;
  }>;
};
declare type CommandClass<Context extends BaseContext = BaseContext> = {
  new (): Command<Context>;
  paths?: Array<Array<string>>;
  schema?: Array<LooseTest<{
    [key: string]: unknown;
  }>>;
  usage?: Usage;
};
/**
 * Base abstract class for CLI commands. The main thing to remember is to
 * declare an async `execute` member function that will be called when the
 * command is invoked from the CLI, and optionally a `paths` property to
 * declare the set of paths under which the command should be exposed.
 */
declare abstract class Command<Context extends BaseContext = BaseContext> {
  /**
   * @deprecated Do not use this; prefer the static `paths` property instead.
   */
  paths?: undefined;
  /**
   * Defined to prevent a common typo.
   */
  static path: never;
  /**
   * Paths under which the command should be exposed.
   */
  static paths?: Array<Array<string>>;
  /**
   * Defines the usage information for the given command.
   */
  static Usage(usage: Usage): Usage;
  /**
   * Contains the usage information for the command. If undefined, the
   * command will be hidden from the general listing.
   */
  static usage?: Usage;
  /**
   * Defines a schema to apply before running the `execute` method. The
   * schema is expected to be generated by Typanion.
   *
   * @see https://github.com/arcanis/typanion
   */
  static schema?: Array<LooseTest<{
    [key: string]: unknown;
  }>>;
  /**
   * Standard function that'll get executed by `Cli#run` and `Cli#runExit`.
   *
   * Expected to return an exit code or nothing (which Clipanion will treat
   * as if 0 had been returned).
   */
  abstract execute(): Promise<number | void>;
  /**
   * Standard error handler which will simply rethrow the error. Can be used
   * to add custom logic to handle errors from the command or simply return
   * the parent class error handling.
   */
  catch(error: any): Promise<void>;
  /**
   * Predefined that will be set to true if `-h,--help` has been used, in
   * which case `Command#execute` won't be called.
   */
  help: boolean;
  /**
   * Predefined variable that will be populated with a miniature API that can
   * be used to query Clipanion and forward commands.
   */
  cli: MiniCli<Context>;
  /**
   * Predefined variable that will be populated with the context of the
   * application.
   */
  context: Context;
  /**
   * Predefined variable that will be populated with the path that got used
   * to access the command currently being executed.
   */
  path: Array<string>;
  validateAndExecute(): Promise<number>;
  /**
   * Used to detect option definitions.
   */
  static isOption: typeof isOptionSymbol;
  /**
   * Just an helper to use along with the `paths` fields, to make it
   * clearer that a command is the default one.
   *
   * @example
   * class MyCommand extends Command {
   *   static paths = [Command.Default];
   * }
   */
  static Default: never[];
}
//#endregion
//#region ../base/dist/helpers/interfaces.d.ts
interface Metadata {
  ci: {
    job: {
      id?: string;
      name?: string;
      url?: string;
    };
    pipeline: {
      id?: string;
      name?: string;
      number?: number;
      url?: string;
    };
    provider: {
      name?: string;
    };
    stage: {
      name?: string;
    };
    workspace_path?: string;
  };
  git: {
    branch?: string;
    commit: {
      author: {
        date?: string;
        email?: string;
        name?: string;
      };
      committer: {
        date?: string;
        email?: string;
        name?: string;
      };
      message?: string;
      sha?: string;
    };
    repository_url?: string;
    tag?: string;
  };
}
//#endregion
//#region ../base/dist/helpers/utils.d.ts
type ProxyType = 'http' | 'https' | 'socks' | 'socks4' | 'socks4a' | 'socks5' | 'socks5h' | 'pac+data' | 'pac+file' | 'pac+ftp' | 'pac+http' | 'pac+https';
interface ProxyConfiguration {
  auth?: {
    password: string;
    username: string;
  };
  host?: string;
  port?: number;
  protocol: ProxyType;
}
//#endregion
//#region src/interfaces.d.ts
type SupportedReporter = 'junit' | 'json' | 'default';
interface MainReporter {
  log(log: string): void;
  error(error: string): void;
  initErrors(errors: string[]): void;
  testTrigger(test: Test, testId: string, executionRule: ExecutionRule, testOverrides: UserConfigOverride): void;
  testWait(test: Test): void;
  testsWait(tests: Test[], baseUrl: string, batchId: string, skippedCount?: number): void;
  resultReceived(result: ResultInBatch): void;
  resultEnd(result: Result, baseUrl: string, batchId: string): void;
  reportStart(timings: {
    startTime: number;
  }): void;
  runEnd(summary: Summary, baseUrl: string, orgSettings?: SyntheticsOrgSettings): void;
  dryRunEnd(summary: InitialSummary, testPlan: TestPlan, config: RunTestsCommandConfig, orgSettings?: SyntheticsOrgSettings): void;
}
interface ReporterContext {
  stdout: Writable;
  stderr: Writable;
}
type Reporter = Partial<MainReporter>;
interface BaseServerResult {
  id: string;
  status: 'passed' | 'failed' | 'skipped';
  failure?: {
    code: string;
    message: string;
  };
  unhealthy?: boolean;
  finished_at: number;
}
interface Device {
  id: string;
  resolution: {
    width: number;
    height: number;
  };
}
interface BrowserServerResult extends BaseServerResult {
  duration: number;
  start_url: string;
  steps: Step[];
}
interface AssertionResult {
  actual: any;
  expected?: any;
  valid: boolean;
}
interface ApiServerResult extends BaseServerResult {
  assertions: AssertionResult[];
  timings: {
    total: number;
  };
}
interface MultiStep {
  allow_failure: boolean;
  assertion_results: AssertionResult[];
  failure?: {
    code: string;
    message: string;
  };
  name: string;
  status: 'passed' | 'failed' | 'skipped';
  subtype: string;
  timings: {
    total: number;
  };
}
interface MultiStepsServerResult extends BaseServerResult {
  duration: number;
  steps: MultiStep[];
}
type ServerResult = BrowserServerResult | ApiServerResult | MultiStepsServerResult;
interface RawPollResult {
  data: {
    id: string;
    type: string;
    attributes: Omit<PollResult, 'test'>;
    relationships: {
      test: {
        data: {
          id: string;
          type: string;
        };
      };
    };
  }[];
  included: {
    type: string;
    id: string;
    attributes: Pick<RawPollResultTest, 'type' | 'subtype' | 'config'>;
  }[];
}
interface RawPollResultTest {
  id: string;
  type: 'browser' | 'api' | 'mobile';
  subtype?: string;
  config: {
    request?: {
      dns_server?: string | undefined;
    };
  };
}
type PollResult = {
  test_type: 'api' | 'browser' | 'mobile';
  test: RecursivePartial<Test>;
  result?: ServerResult;
  resultID: string;
  device?: Device;
};
/**
 * Information required to convert a `PollResult` to a `Result`.
 */
type ResultDisplayInfo = {
  getLocation: (datacenterId: string, test: Test) => string;
  options: {
    batchTimeout: number;
    datadogSite: string;
    failOnCriticalErrors?: boolean;
    failOnTimeout?: boolean;
    subdomain: string;
  };
  tests: Test[];
};
type SelectiveRerunDecision = {
  decision: 'run';
  reason: 'in_progress';
} | {
  decision: 'run';
  reason: 'failed';
  linked_result_id: string;
} | {
  decision: 'run';
  reason: 'edited';
} | {
  decision: 'run';
  reason: 'new';
} | {
  decision: 'skip';
  reason: 'passed';
  linked_result_id: string;
};
interface Summary {
  /** The ID of the CI batch that was started by this datadog-ci execution. */
  batchId: string;
  /** The number of critical errors that occurred during the CI batch. */
  criticalErrors: number;
  /** The number of results expected by datadog-ci, prior to any selective rerun. */
  expected: number;
  /** The number of results that failed during the CI batch. */
  failed: number;
  /** The number of results that failed during the CI batch without blocking the CI. */
  failedNonBlocking: number;
  /** The metadata collected for the CI batch. */
  metadata?: Metadata;
  /** The number of results that passed during the CI batch. */
  passed: number;
  /** The number of results that already passed in previous CI batches on the same commit. */
  previouslyPassed: number;
  /** The number of tests that were skipped when starting the CI batch. */
  skipped: number;
  /** The public IDs of tests that could not be accessed due to permissions when starting the CI batch. */
  testsNotAuthorized: Set<string>;
  /** The public IDs of tests that could not be found when starting the CI batch. */
  testsNotFound: Set<string>;
  /** The number of results that failed due to the CI batch timing out. */
  timedOut: number;
}
interface TestPlanItem {
  /** The execution rule to apply to the test. This is read-only and only here for filtering purposes. To apply overrides, you may edit the `testOverrides`. */
  executionRule: Readonly<ExecutionRule>;
  /** The definition of the test to run. This is read-only and only here for filtering purposes. To apply overrides, you may edit the `testOverrides`. */
  test: Readonly<Test>;
  /** The overrides to apply to the test. You can edit this to alter the test plan. */
  testOverrides: TestPayload;
}
type TestPlan = TestPlanItem[];
interface BaseResult {
  /** The device used in this test run. */
  device?: Device;
  /** Duration of this test run in milliseconds. */
  duration: number;
  /** The execution rule that was used for this test run. */
  executionRule: ExecutionRule;
  /** The ID of the initial attempt if this test run is a retry. */
  initialResultId?: string;
  /** Whether this test run is intermediary and expected to be retried. */
  isNonFinal?: boolean;
  /** The location from which this test run was executed. */
  location: string;
  /** Whether this test run passed, taking into account `failOnCriticalErrors` and `failOnTimeout`. */
  passed: boolean;
  /** Raw information about the test run. May not always be present. */
  result?: ServerResult;
  /** The ID of this test run. */
  resultId: string;
  /** The number of retries, including this test run. */
  retries: number;
  /** The maximum number of retries for this test run. */
  maxRetries: number;
  /** Information about the selective rerun that was applied to this test run. */
  selectiveRerun?: SelectiveRerunDecision;
  /** The test that was run, including any overrides. */
  test: Test;
  /** Whether this test run timed out. */
  timedOut: boolean;
  /** The timestamp of this test run. */
  timestamp: number;
}
type ResultSkippedBySelectiveRerun = Omit<BaseResult, 'duration' | 'location' | 'result' | 'retries' | 'maxRetries' | 'timestamp'> & {
  executionRule: ExecutionRule.SKIPPED;
  selectiveRerun: Extract<SelectiveRerunDecision, {
    decision: 'skip';
  }>;
};
type Result = BaseResult | ResultSkippedBySelectiveRerun;
type Status = 'passed' | 'failed' | 'in_progress' | 'skipped';
type BatchStatus = 'passed' | 'failed' | 'in_progress';
interface BaseResultInBatch {
  duration: number;
  execution_rule: ExecutionRule;
  initial_result_id?: string;
  location: string;
  result_id: string;
  retries: number | null;
  max_retries: number | null;
  selective_rerun?: SelectiveRerunDecision;
  status: Status;
  test_public_id: string;
  timed_out: boolean | null;
}
type SkippedResultInBatch = Omit<BaseResultInBatch, 'duration' | 'location' | 'result_id'> & {
  execution_rule: ExecutionRule.SKIPPED;
  status: 'skipped';
};
type ResultInBatchSkippedBySelectiveRerun = SkippedResultInBatch & {
  selective_rerun: Extract<SelectiveRerunDecision, {
    decision: 'skip';
  }>;
};
type ResultInBatch = BaseResultInBatch | ResultInBatchSkippedBySelectiveRerun;
interface Batch {
  results: ResultInBatch[];
  status: BatchStatus;
}
type ServerResultInBatch = BaseResultInBatch | SkippedResultInBatch;
interface ServerBatch {
  results: ServerResultInBatch[];
  status: BatchStatus;
}
interface Vitals {
  cls?: number;
  lcp?: number;
  url: string;
}
interface BrowserError {
  description: string;
  name: string;
  type: string;
}
interface Step {
  allow_failure: boolean;
  browser_errors: BrowserError[];
  description: string;
  duration: number;
  failure?: {
    code?: string;
    message: string;
  };
  public_id?: string;
  status: string;
  id?: number;
  element_updates?: {
    multi_locator?: MultiLocator;
  };
  sub_test_public_id?: string;
  sub_test_step_details?: Step[];
  type: string;
  url: string;
  value?: string | number;
  vitals_metrics: Vitals[];
  warnings?: {
    message: string;
    type: string;
  }[];
}
interface MultiLocator {
  [key: string]: unknown;
}
interface TestStepWithUnsupportedFields {
  public_id?: string;
  params: {
    element?: {
      multiLocator?: MultiLocator;
      userLocator?: unknown;
    };
  };
}
interface TestRequest {
  dnsServer?: string;
  dnsServerPort?: number;
  headers: {
    [key: string]: string;
  };
  host?: string;
  method: string;
  port?: number;
  timeout: number;
  url: string;
}
interface LocalTestDefinition {
  config: {
    assertions: Assertion[];
    request?: TestRequest;
    steps?: {
      subtype: string;
    }[];
    variables: string[];
  };
  locations: string[];
  name: string;
  options: OptionsWithUnsupportedFields;
  /** Can be used to link to an existing remote test. */
  public_id?: string;
  subtype?: string;
  steps?: TestStepWithUnsupportedFields[];
  type: 'api' | 'browser' | 'mobile';
}
interface Options$1 {
  ci?: {
    executionRule: ExecutionRule;
  };
  device_ids?: string[];
  mobileApplication?: MobileApplication;
  retry?: {
    count?: number;
  };
}
interface OptionsWithUnsupportedFields extends Options$1 {
  bindings?: null | unknown[];
  min_failure_duration?: number;
  min_location_failed?: any;
  monitor_name?: string;
  monitor_options?: any;
  monitor_priority?: number;
  tick_every?: number;
}
interface LocalTestDefinitionWithUnsupportedFields extends LocalTestDefinition {
  created_at?: any;
  created_by?: any;
  creator?: any;
  creation_source?: string;
  message?: string;
  modified_at?: any;
  modified_by?: any;
  monitor_id?: number;
  overall_state?: any;
  overall_state_modified?: any;
  status?: string;
  stepCount?: any;
  tags?: string[];
  version?: any;
  version_uuid?: any;
}
interface ServerTest extends LocalTestDefinitionWithUnsupportedFields {
  monitor_id: number;
  status: 'live' | 'paused';
  public_id: string;
}
type Test = (ServerTest | LocalTestDefinitionWithUnsupportedFields) & {
  suite?: string;
};
interface Assertion {
  actual: string | number | Date | {
    [key: string]: any;
  };
  errorMessage?: string;
  operator: Operator;
  property?: string;
  target: string | number | Date | {
    [key: string]: any;
  };
  type: string;
  valid: boolean;
}
declare enum Operator {
  contains = "contains",
  doesNotContain = "doesNotContain",
  is = "is",
  isNot = "isNot",
  isInLessThan = "isInLessThan",
  isInMoreThan = "isInMoreThan",
  lessThan = "lessThan",
  lessThanOrEqual = "lessThanOrEqual",
  moreThan = "moreThan",
  moreThanOrEqual = "moreThanOrEqual",
  matches = "matches",
  doesNotMatch = "doesNotMatch",
  validatesJSONPath = "validatesJSONPath",
  validatesXPath = "validatesXPath"
}
interface Location {
  display_name: string;
  id: number;
  is_active: boolean;
  name: string;
  region: string;
}
interface LocationsMapping {
  [key: string]: string;
}
interface ServerTrigger {
  batch_id: string;
  locations: Location[];
  selective_rerun_rate_limited?: boolean;
}
interface TriggerInfo {
  batchId: string;
  locations: Location[];
  selectiveRerunRateLimited?: boolean;
  testsNotAuthorized: Set<string>;
}
interface RetryConfig {
  /** The number of attempts to perform in case of test failure. */
  count: number;
  /** The interval between attempts in milliseconds. */
  interval: number;
}
interface MobileApplication {
  applicationId: string;
  referenceId: string;
  referenceType: 'latest' | 'version' | 'temporary';
}
interface CookiesObject {
  /** Whether to append or replace the original cookies. */
  append?: boolean;
  /** Cookie header to add or replace (e.g. `name1=value1;name2=value2;`). */
  value: string;
}
interface BaseConfigOverride {
  /** Override the certificate checks in Synthetic API and Browser tests. */
  allowInsecureCertificates?: boolean;
  /** Override the credentials for basic authentication. */
  basicAuth?: BasicAuthCredentials;
  /** Override the data to send in API tests. */
  body?: string;
  /** Override the content type for the data to send in API tests. */
  bodyType?: string;
  /**
   * Override the cookies for API and browser tests.
   * - If this is a string, it is used to replace the original cookies.
   * - If this is an object, the format must be `{append?: boolean, value: string}`, and depending on the value of `append`, it is appended or replaces the original cookies.
   */
  cookies?: string | CookiesObject;
  /**
   * Override the `Set-Cookie` headers in browser tests only.
   * - If this is a string, it is used to replace the original `Set-Cookie` headers.
   * - If this is an object, the format must be `{append?: boolean, value: string}`, and depending on the value of `append`, it is appended or replaces the original `Set-Cookie` headers.
   */
  setCookies?: string | CookiesObject;
  /**
   * Override the maximum duration of steps in seconds for browser tests. This does not override individually set step timeouts.
   */
  defaultStepTimeout?: number;
  /** Override the list of devices on which to run the Synthetic tests. */
  deviceIds?: string[];
  /**
   * Override the execution rule for Synthetic tests.
   *
   * The execution rule for the test defines the behavior of the CI batch in case of a failing test. It accepts one of the following values:
   *
   * - `blocking`: A failed test causes the CI batch to fail.
   * - `non_blocking`: A failed test does not cause the CI batch to fail.
   * - `skipped`: The test is not run at all.
   */
  executionRule?: ExecutionRule;
  /** Override whether or not to follow HTTP redirections in API tests. */
  followRedirects?: boolean;
  /**
   * Override the headers in the API and browser tests.
   *
   * This object specifies the headers to be replaced in the test. It should have keys representing the names of the headers to be replaced, and values indicating the new header values.
   */
  headers?: {
    [key: string]: string;
  };
  /** Override the list of locations to run the test from. The possible values are listed [in this API response](https://app.datadoghq.com/api/v1/synthetics/locations?only_public=true). */
  locations?: string[];
  /**
   * An array of regex patterns to modify resource URLs in the test. This can be useful for dynamically changing resource URLs during test execution.
   *
   * Each regex pattern should be in the format:
   *
   * - **`your_regex|your_substitution`**: The pipe-based syntax, to avoid any conflicts with / characters in URLs.
   *   - For example, `https://example.com(.*)|http://subdomain.example.com$1` to transform `https://example.com/resource` to `http://subdomain.example.com/resource`.
   * - **`s/your_regex/your_substitution/modifiers`**: The slash syntax, which supports modifiers.
   *   - For example, `s/(https://www.)(.*)/$1staging-$2/` to transform `https://www.example.com/resource` into `https://www.staging-example.com/resource`.
   */
  resourceUrlSubstitutionRegexes?: string[];
  /** Override the retry policy for the test. */
  retry?: RetryConfig;
  /**
   * Override the start URL for API and browser tests.
   *
   * Local and [global variables](https://docs.datadoghq.com/synthetics/platform/settings/?tab=specifyvalue#global-variables) specified in the URL (for example, `{{ URL }}`) are replaced when the test is run.
   *
   * You can combine this with the `variables` override to override both the start URL and the variable values. For example:
   *
   * ```bash
   * --override startUrl="{{ URL }}?static_hash={{ STATIC_HASH }}" --override variables.STATIC_HASH=abcdef
   * ```
   */
  startUrl?: string;
  /**
   * A regex to modify the starting URL of browser and HTTP tests, whether it comes from the original test or the `startUrl` override.
   *
   * If the URL contains variables, this regex applies after the interpolation of the variables.
   *
   * There are two possible formats:
   *
   * - **`your_regex|your_substitution`**: The pipe-based syntax, to avoid any conflicts with `/` characters in URLs.
   *   - For example, `https://example.com(.*)|http://subdomain.example.com$1` to transform `https://example.com/test` to `http://subdomain.example.com/test`.
   * - **`s/your_regex/your_substitution/modifiers`**: The slash syntax, which supports modifiers.
   *   - For example, `s/(https://www.)(.*)/$1extra-$2/` to transform `https://www.example.com` into `https://www.extra-example.com`.
   */
  startUrlSubstitutionRegex?: string;
  /** Override the maximum duration in seconds for browser tests. */
  testTimeout?: number;
  /**
   * Override existing or inject new local and [global variables](https://docs.datadoghq.com/synthetics/platform/settings/?tab=specifyvalue#global-variables) in Synthetic tests.
   *
   * This object should include keys corresponding to the names of the variables to be replaced, and values representing the new values for these variables.
   */
  variables?: {
    [key: string]: string;
  };
}
interface UserConfigOverride extends BaseConfigOverride {
  /** Override the mobile application version for Synthetic mobile application tests. The version must be uploaded and available within Datadog. */
  mobileApplicationVersion?: string;
  /** Override the application version for Synthetic mobile application tests. */
  mobileApplicationVersionFilePath?: string;
}
interface ServerConfigOverride extends BaseConfigOverride {
  appExtractedMetadata?: MobileAppExtractedMetadata;
  mobileApplication?: MobileApplication;
  tunnel?: TunnelInfo;
}
interface BatchOptions {
  batch_timeout?: number;
  selective_rerun?: boolean;
}
interface Payload {
  metadata?: Metadata;
  tests: TestPayload[];
  options?: BatchOptions;
}
interface LocalTestPayload extends ServerConfigOverride {
  local_test_definition: LocalTestDefinition;
}
interface RemoteTestPayload extends ServerConfigOverride {
  public_id: string;
  version?: number;
}
type TestPayload = LocalTestPayload | RemoteTestPayload;
/** Missing test, either because it's not found, or because it could not be read. */
interface TestMissing {
  errorMessage: string;
}
interface TestSkipped {
  test: Test;
  overriddenConfig: TestPayload;
  executionRule: ExecutionRule.SKIPPED;
}
interface TestWithOverride {
  test: Test;
  overriddenConfig: TestPayload;
  executionRule: ExecutionRule;
}
interface MobileTestWithOverride extends TestWithOverride {
  test: Test & {
    type: 'mobile';
    options: {
      mobileApplication: MobileApplication;
    };
  };
}
interface BasicAuthCredentials {
  password: string;
  username: string;
}
interface BaseTriggerConfig {
  /** Overrides for this Synthetic test only. This takes precedence over all other overrides. */
  testOverrides?: UserConfigOverride;
  /** Name of a test suite (for JUnit reports). */
  suite?: string;
}
interface RemoteTriggerConfig extends BaseTriggerConfig {
  /**
   * Public ID of a test (e.g. `abc-def-ghi`), or its full URL (e.g. `https://app.datadoghq.com/synthetics/details/abc-def-ghi`).
   *
   * @pattern ^(https://.*)?([a-z2-9]{3}-[a-z2-9]{3}-[a-z2-9]{3})$
   */
  id: string;
  version?: number;
}
interface LocalTriggerConfig extends BaseTriggerConfig {
  localTestDefinition: LocalTestDefinition;
}
type TriggerConfig = RemoteTriggerConfig | LocalTriggerConfig;
declare enum ExecutionRule {
  BLOCKING = "blocking",
  NON_BLOCKING = "non_blocking",
  SKIPPED = "skipped"
}
interface Suite {
  content: TestConfig;
  name?: string;
}
interface TestConfig {
  tests: TriggerConfig[];
}
interface TestSearchResult {
  tests: {
    public_id: string;
  }[];
}
interface APIConfiguration {
  apiKey: string;
  appKey: string;
  baseIntakeUrl: string;
  baseUnstableUrl: string;
  baseV1Url: string;
  baseV2Url: string;
  proxyOpts: ProxyConfiguration;
}
interface APIHelperConfig {
  apiKey: string;
  appKey: string;
  datadogSite: string;
  proxy: ProxyConfiguration;
}
interface DatadogCIConfig extends APIHelperConfig {
  configPath: string;
}
interface SyntheticsCIConfig extends DatadogCIConfig {}
interface RunTestsCommandConfig extends SyntheticsCIConfig {
  batchTimeout?: number;
  buildCommand?: string;
  defaultTestOverrides?: UserConfigOverride;
  failOnCriticalErrors: boolean;
  failOnMissingTests: boolean;
  failOnTimeout: boolean;
  files: string[];
  jUnitReport?: string;
  jsonReport?: string;
  mobileApplicationVersionFilePath?: string;
  publicIds: string[];
  /** Whether to only run the tests which failed in the previous test batches. By default, the organization default setting is used. */
  selectiveRerun?: boolean;
  /** Used to create URLs to the Datadog UI. */
  subdomain: string;
  testSearchQuery?: string;
  tunnel: boolean;
}
type WrapperConfig = Partial<RunTestsCommandConfig>;
interface UploadApplicationCommandConfig extends SyntheticsCIConfig {
  configPath: string;
  mobileApplicationVersionFilePath?: string;
  mobileApplicationId?: string;
  versionName?: string;
  latest?: boolean;
}
interface MobileApplicationUploadPart {
  partNumber: number;
  md5: string;
  blob: Buffer;
}
interface MobileApplicationUploadPartResponse {
  PartNumber: number;
  ETag: string;
}
interface MultipartPresignedUrlsResponse {
  file_name: string;
  multipart_presigned_urls_params: {
    key: string;
    upload_id: string;
    urls: {
      [key: string]: string;
    };
  };
}
type MobileApplicationNewVersionParams = {
  originalFileName: string;
  versionName: string;
  isLatest: boolean;
};
type AppUploadDetails = {
  appId: string;
  appPath: string;
  versionName?: string;
};
type MobileAppValidationStatus = 'pending' | 'complete' | 'error' | 'user_error';
type MobileInvalidAppResult = {
  invalid_reason: string;
  invalid_message: string;
};
type MobileAppExtractedMetadata = Record<string, unknown>;
type MobileValidAppResult = {
  extracted_metadata: MobileAppExtractedMetadata;
  app_version_uuid: string;
};
type MobileUserErrorResult = {
  user_error_reason: string;
  user_error_message: string;
};
type MobileAppUploadResult = {
  status: MobileAppValidationStatus;
  is_valid?: boolean;
  org_uuid?: string;
  invalid_app_result?: MobileInvalidAppResult;
  valid_app_result?: MobileValidAppResult;
  user_error_result?: MobileUserErrorResult;
};
interface SyntheticsOrgSettings {
  onDemandConcurrencyCap: number;
}
interface MobileApplicationVersion {
  id?: string;
  application_id: string;
  file_name: string;
  original_file_name: string;
  is_latest: boolean;
  version_name: string;
  created_at?: string;
}
interface ImportTestsCommandConfig extends SyntheticsCIConfig {
  configPath: string;
  files: string[];
  publicIds: string[];
  testSearchQuery?: string;
}
interface DeployTestsCommandConfig extends SyntheticsCIConfig {
  configPath: string;
  excludeFields?: string[];
  files: string[];
  publicIds: string[];
  subdomain: string;
}
//#endregion
//#region src/reporters/default.d.ts
declare class DefaultReporter implements MainReporter {
  private context;
  private testWaitSpinner?;
  private write;
  private totalDuration?;
  constructor({
    context
  }: {
    context: ReporterContext;
  });
  error(error: string): void;
  initErrors(errors: string[]): void;
  log(log: string): void;
  reportStart(timings: {
    startTime: number;
  }): void;
  resultEnd(result: Result, baseUrl: string, batchId: string): void;
  resultReceived(result: ResultInBatch): void;
  dryRunEnd(summary: InitialSummary, testPlan: TestPlan, config: RunTestsCommandConfig, orgSettings?: SyntheticsOrgSettings): void;
  runEnd(summary: Summary, baseUrl: string, orgSettings?: SyntheticsOrgSettings): void;
  testsWait(tests: Test[], baseUrl: string, batchId: string, skippedCount?: number): void;
  testTrigger(test: Pick<Test, 'name'>, testId: string, executionRule: ExecutionRule, testOverrides: UserConfigOverride): void;
  testWait(test: Test): void;
  private removeSpinner;
}
//#endregion
//#region src/reporters/file.d.ts
type Args$2 = {
  context: ReporterContext;
  defaultExtension: string;
  destination: string;
  reportName: string;
};
declare abstract class FileReporter {
  protected destination: string;
  protected write: Writable['write'];
  private reportName;
  constructor({
    context,
    defaultExtension,
    destination,
    reportName
  }: Args$2);
  protected writeReportToFile(contents: string): void;
}
//#endregion
//#region src/reporters/json.d.ts
interface Args$1 {
  context: ReporterContext;
  jsonReport?: string;
}
declare class JSONReporter extends FileReporter implements Reporter {
  private readonly results;
  constructor({
    context,
    jsonReport
  }: Args$1);
  resultEnd(result: Result): void;
  runEnd(): void;
}
//#endregion
//#region src/reporters/junit.d.ts
interface SuiteStats {
  errors: number;
  failures: number;
  skipped: number;
  tests: number;
}
interface TestCaseStats {
  steps_allowfailures: number;
  steps_count: number;
  steps_errors: number;
  steps_failures: number;
  steps_skipped: number;
  steps_warnings: number;
}
interface XMLSuiteProperties extends SuiteStats {
  name: string;
}
interface XMLSuite {
  $: XMLSuiteProperties;
  testcase: XMLTestCase[];
}
interface XMLTestCaseProperties extends TestCaseStats {
  classname: string | undefined;
  file: string | undefined;
  name: string;
  time: number | undefined;
  timestamp: string;
}
interface XMLTestCase {
  $: XMLTestCaseProperties;
  allowed_error: XMLError[];
  browser_error: XMLError[];
  error: XMLError[];
  failure: XMLError[];
  properties: {
    property: {
      $: {
        name: string;
        value: any;
      };
    }[];
  };
  skipped: string[];
  warning: XMLError[];
}
interface XMLJSON {
  testsuites: {
    $: {
      batch_id: string;
      batch_url: string;
      name: string;
      tests_critical_error: number;
      tests_failed: number;
      tests_failed_non_blocking: number;
      tests_not_authorized: number;
      tests_not_found: number;
      tests_passed: number;
      tests_skipped: number;
      tests_timed_out: number;
    };
    testsuite: XMLSuite[];
  };
}
interface XMLError {
  $: {
    [key: string]: string;
    type: string;
  };
  _: string;
}
interface Args {
  context: ReporterContext;
  jUnitReport?: string;
  runName?: string;
}
declare class JUnitReporter extends FileReporter implements Reporter {
  private builder;
  private json;
  constructor({
    context,
    jUnitReport,
    runName
  }: Args);
  resultEnd(result: Result, baseUrl: string, batchId: string): void;
  runEnd(summary: Summary, baseUrl: string): void;
  testTrigger(test: Test, testId: string, executionRule: ExecutionRule, testOverrides: UserConfigOverride): void;
  private addTestCaseToSuite;
  private getApiStepStats;
  private getApiTestErrors;
  private getBrowserStepStats;
  private getBrowserTestErrors;
  private getMultiStepTestErrors;
  private getSkippedTestCase;
  private getSuiteByName;
  private getTestCase;
  private getTestCaseStats;
}
//#endregion
//#region src/run-tests-lib.d.ts
type ExecuteOptions = {
  initialSummary?: InitialSummary;
  jUnitReport?: string;
  jsonReport?: string;
  reporters?: (SupportedReporter | Reporter)[];
  runId?: string;
  suites?: Suite[];
  testPlan?: TestPlan;
};
declare const executeTests: (reporter: MainReporter, config: RunTestsCommandConfig, suites?: Suite[], testPlan?: TestPlan, providedInitialSummary?: InitialSummary) => Promise<{
  results: Result[];
  summary: Summary;
}>;
declare const planDryRun: (reporter: MainReporter, runConfig: WrapperConfig, suites?: Suite[]) => Promise<{
  testPlan: TestPlan;
  initialSummary: InitialSummary;
}>;
declare const executeWithDetails: (runConfig: WrapperConfig, executeOptions: ExecuteOptions) => Promise<{
  results: Result[];
  summary: Summary;
  exitCode: 0 | 1;
}>;
declare const execute: (runConfig: WrapperConfig, executeOptions: ExecuteOptions) => Promise<0 | 1>;
//#endregion
//#region src/index.d.ts
declare const DEFAULT_COMMAND_CONFIG: RunTestsCommandConfig;
//#endregion
//#region ../base/dist/index.d.ts
type CommandContext = BaseContext & {
  builtinPlugins: string[];
};
/**
 * This command should be extended by **every** command in the monorepo.
 */
declare abstract class BaseCommand extends Command<CommandContext> {}
//#endregion
//#region ../base/dist/commands/synthetics/deploy-tests.d.ts
declare class SyntheticsDeployTestsCommand extends BaseCommand {
  static paths: string[][];
  static usage: Usage;
  protected apiKey: string | undefined;
  protected appKey: string | undefined;
  protected configPath: string | undefined;
  protected datadogSite: string | undefined;
  protected fips: boolean;
  protected fipsIgnoreError: boolean;
  files: string[] | undefined;
  publicIds: string[] | undefined;
  subdomain: string | undefined;
  excludeFields: string[] | undefined;
  execute(): Promise<number | void>;
}
//#endregion
//#region ../base/dist/helpers/logger.d.ts
declare enum LogLevel {
  DEBUG = 1,
  INFO = 2,
  WARN = 3,
  ERROR = 4
}
declare class Logger {
  private loglevel;
  private writeMessage;
  private shouldIncludeTimestamp;
  constructor(writeMessage: (s: string) => void, loglevel: LogLevel, shouldIncludeTimestamp?: boolean);
  setLogLevel(newLogLevel: LogLevel): void;
  setShouldIncludeTime(newShouldIncludeTimestamp: boolean): void;
  error(s: string): void;
  warn(s: string): void;
  info(s: string): void;
  debug(s: string): void;
}
//#endregion
//#region src/commands/deploy-tests.d.ts
declare class PluginCommand$3 extends SyntheticsDeployTestsCommand {
  protected reporter: MainReporter;
  protected config: DeployTestsCommandConfig;
  protected fipsConfig: {
    fips: boolean;
    fipsIgnoreError: boolean;
  };
  protected logger: Logger;
  static getDefaultConfig(): DeployTestsCommandConfig;
  protected setup(): Promise<void>;
  protected resolveConfig(): Promise<void>;
  execute(): Promise<1 | 0>;
  protected resolveConfigFromEnv(): RecursivePartial<DeployTestsCommandConfig>;
  protected resolveConfigFromCli(): RecursivePartial<DeployTestsCommandConfig>;
}
//#endregion
//#region ../base/dist/commands/synthetics/import-tests.d.ts
declare class SyntheticsImportTestsCommand extends BaseCommand {
  static paths: string[][];
  static usage: Usage;
  protected apiKey: string | undefined;
  protected appKey: string | undefined;
  protected configPath: string | undefined;
  protected datadogSite: string | undefined;
  protected fips: boolean;
  protected fipsIgnoreError: boolean;
  files: string[] | undefined;
  publicIds: string[] | undefined;
  testSearchQuery: string | undefined;
  execute(): Promise<number | void>;
}
//#endregion
//#region src/commands/import-tests.d.ts
declare class PluginCommand$2 extends SyntheticsImportTestsCommand {
  protected reporter: MainReporter;
  protected config: ImportTestsCommandConfig;
  protected fipsConfig: {
    fips: boolean;
    fipsIgnoreError: boolean;
  };
  protected logger: Logger;
  static getDefaultConfig(): ImportTestsCommandConfig;
  protected setup(): Promise<void>;
  protected resolveConfig(): Promise<void>;
  execute(): Promise<1 | 0>;
  protected resolveConfigFromEnv(): RecursivePartial<ImportTestsCommandConfig>;
  protected resolveConfigFromCli(): RecursivePartial<ImportTestsCommandConfig>;
}
//#endregion
//#region ../base/dist/commands/synthetics/run-tests.d.ts
declare class SyntheticsRunTestsCommand extends BaseCommand {
  static paths: string[][];
  static usage: Usage;
  jUnitReport: string | undefined;
  jsonReport: string | undefined;
  runName: string | undefined;
  protected apiKey: string | undefined;
  protected appKey: string | undefined;
  protected configPath: string | undefined;
  protected datadogSite: string | undefined;
  protected fips: boolean;
  protected fipsIgnoreError: boolean;
  batchTimeout: number | undefined;
  failOnCriticalErrors: boolean | undefined;
  failOnMissingTests: boolean | undefined;
  failOnTimeout: boolean | undefined;
  files: string[] | undefined;
  mobileApplicationVersion: string | undefined;
  mobileApplicationVersionFilePath: string | undefined;
  overrides: string[] | undefined;
  publicIds: string[] | undefined;
  selectiveRerun: boolean | undefined;
  subdomain: string | undefined;
  testSearchQuery: string | undefined;
  tunnel: boolean | undefined;
  buildCommand: string | undefined;
  dryRun: boolean | undefined;
  execute(): Promise<number | void>;
}
//#endregion
//#region src/commands/run-tests.d.ts
declare class PluginCommand$1 extends SyntheticsRunTestsCommand {
  protected reporter: MainReporter;
  protected config: RunTestsCommandConfig;
  protected fipsConfig: {
    fips: boolean;
    fipsIgnoreError: boolean;
  };
  protected setup(): Promise<void>;
  protected resolveConfig(): Promise<void>;
  execute(): Promise<1 | 0>;
  protected resolveConfigFromEnv(): RecursivePartial<RunTestsCommandConfig>;
  protected resolveConfigFromCli(): RecursivePartial<RunTestsCommandConfig>;
  protected normalizeConfig(): void;
  protected validateConfig(): void;
  protected getReporters(): Reporter[];
}
//#endregion
//#region ../base/dist/commands/synthetics/upload-application.d.ts
declare class SyntheticsUploadApplicationCommand extends BaseCommand {
  static paths: string[][];
  static usage: Usage;
  protected apiKey: string | undefined;
  protected appKey: string | undefined;
  protected configPath: string | undefined;
  protected datadogSite: string | undefined;
  protected fips: boolean;
  protected fipsIgnoreError: boolean;
  mobileApplicationVersionFilePath: string | undefined;
  mobileApplicationId: string | undefined;
  versionName: string | undefined;
  latest: boolean | undefined;
  execute(): Promise<number | void>;
}
//#endregion
//#region src/commands/upload-application.d.ts
declare class PluginCommand extends SyntheticsUploadApplicationCommand {
  protected config: UploadApplicationCommandConfig;
  protected fipsConfig: {
    fips: boolean;
    fipsIgnoreError: boolean;
  };
  protected logger: Logger;
  static getDefaultConfig(): UploadApplicationCommandConfig;
  protected setup(): Promise<void>;
  protected resolveConfig(): Promise<void>;
  execute(): Promise<1 | 0>;
  protected resolveConfigFromEnv(): RecursivePartial<UploadApplicationCommandConfig>;
  protected resolveConfigFromCli(): RecursivePartial<UploadApplicationCommandConfig>;
}
//#endregion
//#region dist/.bundle-entry.d.ts
declare const commands: {
  "deploy-tests": {
    PluginCommand: typeof PluginCommand$3;
  };
  "import-tests": {
    PluginCommand: typeof PluginCommand$2;
  };
  "run-tests": {
    PluginCommand: typeof PluginCommand$1;
  };
  "upload-application": {
    PluginCommand: typeof PluginCommand;
  };
};
//#endregion
export { APIConfiguration, APIHelperConfig, ApiServerResult, AppUploadDetails, Assertion, BaseConfigOverride, BaseResult, BaseResultInBatch, BaseServerResult, BasicAuthCredentials, Batch, BatchOptions, BrowserError, BrowserServerResult, CiError, CookiesObject, CriticalError, DEFAULT_COMMAND_CONFIG, DatadogCIConfig, DefaultReporter, DeployTestsCommandConfig, Device, ExecutionRule, ImportTestsCommandConfig, JSONReporter, JUnitReporter, LocalTestDefinition, LocalTestPayload, LocalTriggerConfig, Location, LocationsMapping, MainReporter, MobileAppExtractedMetadata, MobileAppUploadResult, MobileApplication, MobileApplicationNewVersionParams, MobileApplicationUploadPart, MobileApplicationUploadPartResponse, MobileApplicationVersion, MobileTestWithOverride, MultiLocator, MultiStep, MultiStepsServerResult, MultipartPresignedUrlsResponse, Operator, OptionsWithUnsupportedFields, Payload, PollResult, RawPollResult, RawPollResultTest, RemoteTestPayload, RemoteTriggerConfig, Reporter, ReporterContext, Result, ResultDisplayInfo, ResultInBatch, ResultInBatchSkippedBySelectiveRerun, ResultSkippedBySelectiveRerun, RetryConfig, RunTestsCommandConfig, SelectiveRerunDecision, ServerBatch, ServerConfigOverride, ServerResult, ServerTest, ServerTrigger, Step, Suite, Summary, SupportedReporter, SyntheticsCIConfig, SyntheticsOrgSettings, Test, TestConfig, TestMissing, TestPayload, TestPlan, TestPlanItem, TestRequest, TestSearchResult, TestSkipped, TestStepWithUnsupportedFields, TestWithOverride, TriggerConfig, TriggerInfo, UploadApplicationCommandConfig, UserConfigOverride, Vitals, WrapperConfig, type XMLJSON, commands, execute, executeTests, executeWithDetails, planDryRun, public_d_exports as utils };
//# sourceMappingURL=bundle.d.ts.map