import { Deserializer, DeserializerConfig, FieldTransform, RuleContext, SerdeType, Serializer, SerializerConfig } from "./serde";
import { Client, SchemaInfo } from "../schemaregistry-client";
import avro, { ForSchemaOptions, Type } from "avsc";
import { LRUCache } from 'lru-cache';
import { RuleRegistry } from "./rule-registry";
export type AvroSerdeConfig = Partial<ForSchemaOptions>;
export interface AvroSerde {
    schemaToTypeCache: LRUCache<string, [avro.Type, Map<string, string>]>;
}
/**
 * AvroSerializerConfig is used to configure the AvroSerializer.
 */
export type AvroSerializerConfig = SerializerConfig & AvroSerdeConfig;
/**
 * AvroSerializer is used to serialize messages using Avro.
 */
export declare class AvroSerializer extends Serializer implements AvroSerde {
    schemaToTypeCache: LRUCache<string, [avro.Type, Map<string, string>]>;
    /**
     * Create a new AvroSerializer.
     * @param client - the schema registry client
     * @param serdeType - the type of the serializer
     * @param conf - the serializer configuration
     * @param ruleRegistry - the rule registry
     */
    constructor(client: Client, serdeType: SerdeType, conf: AvroSerializerConfig, ruleRegistry?: RuleRegistry);
    /**
     * serialize is used to serialize a message using Avro.
     * @param topic - the topic to serialize the message for
     * @param msg - the message to serialize
     */
    serialize(topic: string, msg: any): Promise<Buffer>;
    fieldTransform(ctx: RuleContext, fieldTransform: FieldTransform, msg: any): Promise<any>;
    toType(info: SchemaInfo): Promise<[Type, Map<string, string>]>;
    static messageToSchema(msg: any): avro.Type;
}
/**
 * AvroDeserializerConfig is used to configure the AvroDeserializer.
 */
export type AvroDeserializerConfig = DeserializerConfig & AvroSerdeConfig;
/**
 * AvroDeserializer is used to deserialize messages using Avro.
 */
export declare class AvroDeserializer extends Deserializer implements AvroSerde {
    schemaToTypeCache: LRUCache<string, [avro.Type, Map<string, string>]>;
    /**
     * Create a new AvroDeserializer.
     * @param client - the schema registry client
     * @param serdeType - the type of the deserializer
     * @param conf - the deserializer configuration
     * @param ruleRegistry - the rule registry
     */
    constructor(client: Client, serdeType: SerdeType, conf: AvroDeserializerConfig, ruleRegistry?: RuleRegistry);
    deserialize(topic: string, payload: Buffer): Promise<any>;
    fieldTransform(ctx: RuleContext, fieldTransform: FieldTransform, msg: any): Promise<any>;
    toType(info: SchemaInfo): Promise<[Type, Map<string, string>]>;
}
