import * as rollup from 'rollup';
import * as src from 'src';
import { UnpluginOptions } from 'unplugin';

declare const CONFIG_KEY$1: "rum";

type MinifiedPathPrefix = `http://${string}` | `https://${string}` | `/${string}`;
type RumSourcemapsOptions = {
    bailOnError?: boolean;
    dryRun?: boolean;
    intakeUrl?: string;
    maxConcurrency?: number;
    minifiedPathPrefix: MinifiedPathPrefix;
    releaseVersion: string;
    service: string;
};
type RumOptions = {
    disabled?: boolean;
    sourcemaps?: RumSourcemapsOptions;
};
interface OptionsWithRum extends GetPluginsOptions {
    [CONFIG_KEY$1]: RumOptions;
}

type types$1 = {
    RumOptions: RumOptions;
    OptionsWithRum: OptionsWithRum;
};

declare const CONFIG_KEY: "telemetry";

type types = {
    Filter: Filter;
    Metric: Metric;
    TelemetryOptions: TelemetryOptions;
};

declare class TrackedFilesMatcher {
    private trackedFilenames;
    constructor(trackedFiles: string[]);
    private displaySource;
    matchSourcemap(srcmapPath: string, onSourcesNotFound: (reason: string) => void): string[] | undefined;
    matchSources(sources: string[]): string[];
    rawTrackedFilesList(): string[];
    private getFilename;
}

interface RepositoryData {
    hash: string;
    remote: string;
    trackedFilesMatcher: TrackedFilesMatcher;
}
type File = {
    filepath: string;
    name: string;
    size: number;
    type: string;
};
type Input = File & {
    dependencies: Set<Input>;
    dependents: Set<Input>;
};
type Output = File & {
    inputs: (Input | Output)[];
};
type Entry = Output & {
    outputs: Output[];
};
type BuildReport = {
    errors: string[];
    warnings: string[];
    entries?: Entry[];
    inputs?: Input[];
    outputs?: Output[];
    start?: number;
    end?: number;
    duration?: number;
    writeDuration?: number;
};
type BundlerReport = {
    name: string;
    fullName: string;
    outDir: string;
    rawConfig?: any;
    variant?: string;
};
type ToInjectItem = {
    type: 'file' | 'code';
    value: string;
    fallback?: ToInjectItem;
};
type GlobalContext = {
    auth?: AuthOptions;
    inject: (item: ToInjectItem) => void;
    bundler: BundlerReport;
    build: BuildReport;
    cwd: string;
    git?: RepositoryData;
    start: number;
    version: string;
};
type GetCustomPlugins<T> = (options: T, context: GlobalContext) => UnpluginOptions[];
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
type AuthOptions = {
    apiKey?: string;
};
interface GetPluginsOptions {
    auth?: AuthOptions;
    disableGit?: boolean;
    logLevel?: LogLevel;
}
interface Options extends GetPluginsOptions {
    [CONFIG_KEY$1]?: RumOptions;
    [CONFIG_KEY]?: TelemetryOptions;
    customPlugins?: GetCustomPlugins<Options>;
}

interface Metric {
    metric: string;
    type: 'count' | 'size' | 'duration';
    value: number;
    tags: string[];
}
type Filter = (metric: Metric) => Metric | null;
type OutputOptions = boolean | string | {
    destination: string;
    timings?: boolean;
    metrics?: boolean;
};
type TelemetryOptions = {
    disabled?: boolean;
    /** @deprecated */
    enableTracing?: boolean;
    endPoint?: string;
    filters?: Filter[];
    output?: OutputOptions;
    prefix?: string;
    tags?: string[];
    timestamp?: number;
};

declare const datadogRollupPlugin: (options: src.RollupPluginOptions) => rollup.Plugin<any>[];

declare const version: string;
declare const helpers: {
    telemetry: {
        filters: ((metric: Metric) => Metric | null)[];
    };
};

export { type Options as RollupPluginOptions, type types$1 as RumTypes, type types as TelemetryTypes, datadogRollupPlugin, helpers, version };


if (typeof module !== 'undefined') {
    module.exports = {
        RollupPluginOptions,
        RumTypes,
        TelemetryTypes,
        datadogRollupPlugin,
        helpers,
        version
    };
}
//# sourceMappingURL=index.d.ts.map
