/** Severity levels emitted by `FunLogger`. */
export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
/** User tracking consent, mirroring the Datadog browser SDK's values. */
export type TrackingConsent = 'granted' | 'not-granted';
/**
 * The structured context `FunLogger` assembles for every record: the caller's
 * data plus the logger's resolved user/session fields. Concrete (rather than
 * `object`) so transport implementors get property access and autocomplete.
 */
export interface LogContext {
    /** Caller-supplied structured data for this log line, if any. */
    data?: object;
    apiKey: string | null;
    userId: string | null;
    userName: string | null;
    userAddress: string | null;
    userLoginType: string | null;
    typeLabel: string | null;
    sdkVersion: string | null;
}
/** A single fully-assembled log record handed to a transport. */
export interface LogRecord {
    level: LogLevel;
    title: string;
    /** Assembled by `FunLogger` so transports stay dumb sinks. */
    context: LogContext;
    /** Present only for `error`-level records. */
    error?: Error;
}
/**
 * Platform sink for `FunLogger`. The logger (queueing, env detection, level
 * routing, console fallback, context tracking) is platform-agnostic; everything
 * platform-specific about *emitting* lives behind this interface.
 *
 * Part of the React Native split (see docs/connect-rn-architecture.md): web
 * implements it with `DatadogBrowserLogsTransport`, React Native will implement
 * it with a Datadog React Native transport (`@datadog/mobile-react-native`).
 * Kept free of DOM/`@datadog/browser-logs` types so it can move to
 * `@funkit/connect-core` untouched.
 */
export interface LogTransport {
    /** Emit one record to the platform sink. */
    log(record: LogRecord): void;
    /**
     * Reflect the resolved environment (e.g. `'development'` | `'production'`).
     * Optional — sinks that don't segment by environment can omit it.
     */
    setEnv?(environment: string): void;
    /** Reflect user tracking consent. Optional. */
    setTrackingConsent?(consent: TrackingConsent): void;
}
