import { Timestamp } from '@bufbuild/protobuf'; import { AtUriString, Cid, InferInput, InferOutput, LexValue, RecordSchema, Schema, TypedLexMap } from '@atproto/lex'; import { Record as RecordEntry } from '../proto/bsky_pb.js'; export declare class HydrationMap extends Map implements Merges { merge(map: HydrationMap): this; } export interface Merges { merge(map: T): this; } export type RecordInfo = { record: T; cid: string; sortedAt: Date; indexedAt: Date; takedownRef: string | undefined; }; export declare const mergeMaps: >(mapA?: V, mapB?: V) => V | undefined; export declare const mergeNestedMaps: >(mapA?: HydrationMap, mapB?: HydrationMap) => HydrationMap | undefined; export declare const mergeManyMaps: (...maps: HydrationMap[]) => HydrationMap | undefined; export type ItemRef = { uri: AtUriString; cid?: string; }; export declare function parseRecord(recordSchema: TSchema, recordEntry: RecordEntry, includeTakedowns: boolean): RecordInfo> | undefined; /** * Decodes binary data containing a JSON representation of a Lex value, and * validates it against the provided schema, in parse mode (i.e., allowing * coercion & defaults). * * Returns undefined if the input is empty (from dataplane's empty value * convention), or if the validation fails. */ export declare const parseJsonBytes: >(schema: TSchema, bytes: Uint8Array | undefined) => InferOutput | undefined; export declare const parseString: (str: undefined | string) => T | undefined; export declare const parseCid: (cidStr: string | undefined) => Cid | null; export declare const parseDate: (timestamp: Timestamp | undefined) => Date | undefined; export declare const urisByCollection: (uris: Iterable) => Map; export declare const split: (items: T[], predicate: (item: T) => boolean) => [T[], T[]]; export declare const safeTakedownRef: (obj?: { takenDown: boolean; takedownRef: string; }) => string | undefined; export declare const isActivitySubscriptionEnabled: ({ post, reply, }: { post: boolean; reply: boolean; }) => boolean; //# sourceMappingURL=util.d.ts.map