export type RecordLike = Record; export interface InitialsOptions { fallback?: string; maxLength?: number; splitPattern?: RegExp; } /** * Builds short uppercase initials from a display name (avatars, fallbacks). * * @example * initials("Ada Lovelace") // "AL" * initials(null, { fallback: "?" }) // "?" */ export declare function initials(value: string | null | undefined, options?: InitialsOptions): string; /** * Returns a plain object record for non-array objects, otherwise `null`. * * Prefer this over `as` casts when reading untyped API/session payloads. */ export declare function asRecord(value: unknown): RecordLike | null; /** * Like {@link asRecord}, but always returns an object (empty when not a record). */ export declare function asRecordOrEmpty(value: unknown): RecordLike; /** * Reads the first non-empty string across candidate keys on a record. */ export declare function getString(record: RecordLike | null | undefined, keys: readonly string[]): string; /** * Reads the first boolean across candidate keys on a record. * * TypeScript overloads (not triple runtime exports): * - without `fallback` → `boolean | undefined` * - with `fallback` → always `boolean` * * Only actual `typeof value === "boolean"` values match; string `"true"` is ignored. */ export declare function getBoolean(record: RecordLike | null | undefined, keys: readonly string[]): boolean | undefined; export declare function getBoolean(record: RecordLike | null | undefined, keys: readonly string[], fallback: boolean): boolean; /** * Trims a string value; returns `""` for non-strings. */ export declare function toStringOrEmpty(value: unknown): string; export interface DisplayStringOptions { /** * When true (default), blank/whitespace strings also fall through to * `fallback`. */ treatBlankAsEmpty?: boolean; } /** * Coerces unknown field values to a display string for read-only inputs. * * ```ts * displayString(record.name, "Unnamed") // "Ada" | "Unnamed" * displayString(null, "—") // "—" * ``` */ export declare function displayString(value: unknown, fallback?: string, options?: DisplayStringOptions): string; /** * Formats a boolean (or unknown) as a human label for read-only fields. */ export declare function displayBoolean(value: unknown, options?: { trueLabel?: string; falseLabel?: string; }): string; /** * Extracts and trims `session.token` from Athena Auth session-shaped payloads. * * Accepts either a session object or a wrapper `{ session: { token } }`. */ export declare function extractAthenaSessionToken(value: unknown): string;