import { CreateLogStreamRequest } from "@aws-sdk/client-cloudwatch-logs";
import type { RegionInputConfig } from "@smithy/config-resolver/dist-types/regionConfig/resolveRegionConfig";
import type { AwsCredentialIdentity } from "@smithy/types/dist-types/identity/awsCredentialIdentity";
import type { AppenderFunction, Layout, LayoutFunction, LayoutsParam, Levels } from "log4js";
export interface Config extends CreateLogStreamRequest, Pick<RegionInputConfig, "region">, Partial<Pick<AwsCredentialIdentity, "accessKeyId" | "secretAccessKey" | "sessionToken">> {
    /**
     * defaults to http://npm.im/log4js-layout-json
     */
    layout?: Layout;
    /**
     * Maximum number of log events to include in a single batch when sending.
     * Once the batch size is reached, it will be sent to CloudWatch.
     */
    batchSize: number;
    /**
     * Maximum time (in milliseconds) to wait before sending a batch of logs,
     * regardless of the batch size. If the timeout is reached before the batch
     * size is met, the logs will be sent.
     */
    bufferTimeout: number;
    /**
     * required policy:
     * - logs:CreateLogGroup
     * - logs:CreateLogStream
     */
    createResources?: boolean;
    endpoint?: string;
}
declare module "log4js" {
    interface Appenders {
        CloudwatchAppender: {
            type: "log4js-appender-cloudwatch";
        } & Config;
    }
}
/**
 * TODO: create async method for appender creation
 * 		 (for now log4js doesn't support async configure module)
 */
export declare function cloudwatch(config: Config, layout: LayoutFunction): AppenderFunction;
export declare class ConfigError extends Error {
    constructor(msg: string, cause?: unknown);
}
export declare function configure(config: Config, layouts: LayoutsParam, _findAppender: () => AppenderFunction, _levels: Levels): AppenderFunction;
