import { COMPATIBILITY } from './constants'; import { SchemaRegistryAPIClientArgs } from './api'; import Cache from './cache'; import { Schema, RawAvroSchema, AvroSchema, SchemaType, ConfluentSchema, SchemaRegistryAPIClientOptions, AvroConfluentSchema, SchemaHelper, SchemaReference } from './@types'; export interface RegisteredSchema { id: number; } interface Opts { compatibility?: COMPATIBILITY; separator?: string; subject: string; } interface AvroDecodeOptions { readerSchema?: RawAvroSchema | AvroSchema | Schema; } export interface DecodeOptions { [SchemaType.AVRO]?: AvroDecodeOptions; } export default class SchemaRegistry { private api; private cacheMissRequests; private options; cache: Cache; constructor({ auth, clientId, host, retry, agent, middlewares }: SchemaRegistryAPIClientArgs, options?: SchemaRegistryAPIClientOptions); private isConfluentSchema; private getConfluentSchema; register(schema: Exclude, userOpts: Opts): Promise; register(schema: RawAvroSchema | AvroConfluentSchema, userOpts?: Omit & { subject?: string; }): Promise; register(schema: RawAvroSchema | ConfluentSchema, userOpts: Opts): Promise; private updateOptionsWithSchemaReferences; private asProtocolOptions; private getreferencedSchemas; private getreferencedSchemasRecursive; getreferencedSchemasFromReference(reference: SchemaReference, helper: SchemaHelper, referencesSet: Set): Promise; private _getSchema; getSchema(registryId: number): Promise; encode(registryId: number, payload: any): Promise; private collectInvalidPaths; decode(buffer: Buffer, options?: DecodeOptions): Promise; getRegistryId(subject: string, version: number | string): Promise; getRegistryIdBySchema(subject: string, schema: AvroSchema | RawAvroSchema | ConfluentSchema): Promise; getLatestSchemaId(subject: string): Promise; private getSchemaOriginRequest; } export {};