import { DecoratorOptions, DeflateOptions, InflateOptions } from '../shared/options'; import { Constructor } from '../shared/util'; import { BsonType } from './bson_type'; export declare const BACKEND_NAME = "bson"; /** * Define serializer for given property or type * @param options _(optional)_ Custom type serializer and/or other options * @returns Type/property decorator */ export declare function Serialize(options?: DecoratorOptions): (protoOrCtor: Object | Constructor, propertyName?: string) => void; /** * Serialize given serializable type instance to BSON type * @param serializable Serializable type instance * @param options _(optional)_ Deflate options * @returns BSON type (js-bson) */ export declare function deflate(serializable: TOriginal, options?: DeflateOptions): BsonType; /** * Serialize given serializable type instance to BSON binary * @param serializable Serializable type instance * @param options _(optional)_ Deflate options * @returns Buffer with BSON binary */ export declare function deflateToBinary(serializable: TOriginal, options?: DeflateOptions): Uint8Array; /** * Construct/deserialize a serializable type instance from BSON type * @param ctor Serializable type constructor function * @param serialized BSON object (js-bson) * @param options _(optional)_ Inflate options * @returns Serializable type instance */ export declare function inflate(ctor: Constructor, serialized: BsonType, options?: InflateOptions): TOriginal; /** * Construct/deserialize a serializable type instance from BSON binary * @param ctor Serializable type constructor function * @param serialized Buffer with BSON binary * @param options _(optional)_ Inflate options * @returns Serializable type instance */ export declare function inflateFromBinary(ctor: Constructor, serialized: Uint8Array, options?: InflateOptions): TOriginal; export * from './bson_type';