/** * Shared JSON parsing helpers used by document-based chat parsers * (Telegram, Messenger, iMessage JSON bundles). */ import type { MediaType } from '../types'; export declare function isRecord(value: unknown): value is Record; export declare function getString(record: Record, key: string): string | undefined; export declare function hasValue(record: Record, key: string): boolean; export declare function isStringArray(value: unknown): value is readonly string[]; export declare function isHttpUrl(value: unknown): value is string; /** * Parse a JSON document and throw a parser-specific error on failure. */ export declare function parseJsonOrThrow(raw: string, errorMessage: string): unknown; /** * Deduplicate URLs while preserving insertion order. */ export declare function dedupeUrls(urls: readonly string[]): string[]; /** * Return the trimmed content, or fall back to a `[mediaType]` placeholder * when the message has no text but did carry media. */ export declare function applyMediaPlaceholder(content: string, mediaType: MediaType | undefined): string; //# sourceMappingURL=json-helpers.d.ts.map