export declare function camelToSnake(key: string): string;
export declare function snakeToCamel(key: string): string;
export declare function toDbCase<T extends Record<string, unknown>>(obj: T, opts?: {
    deep?: false;
    excludeKeys?: string[];
}): DecamelizeKeys<T>;
export declare function toDbCase(obj: Record<string, unknown>, opts: {
    deep: true;
    excludeKeys?: string[];
}): unknown;
export declare function fromDbCase<T extends Record<string, unknown>>(obj: T, opts?: {
    deep?: true;
    excludeKeys?: string[];
}): DeepCamelizeKeys<T>;
export declare function fromDbCase<T extends Record<string, unknown>>(obj: T, opts: {
    deep: false;
    excludeKeys?: string[];
}): CamelizeKeys<T>;
export declare function fromDbCase<TResult>(obj: unknown, opts?: {
    deep?: boolean;
    excludeKeys?: string[];
}): TResult;
export type SnakeToCamel<S extends string> = S extends `${infer P}_${infer R}` ? `${Lowercase<P> extends '' ? '' : Lowercase<P> extends S ? P : Lowercase<P>}${Capitalize<SnakeToCamel<R>>}` : S;
export type CamelToSnake<S extends string> = S extends `${infer H}${infer T}` ? H extends Lowercase<H> ? `${H}${CamelToSnake<T>}` : `_${Lowercase<H>}${CamelToSnake<T>}` : S;
export type CamelizeKeys<T> = {
    [K in keyof T as K extends string ? SnakeToCamel<K> : K]: T[K];
};
/**
 * Recursively camelizes all keys in an object type, including nested objects.
 * Matches the runtime behavior of fromDbCase (which does deep conversion by default).
 *
 * Use this for Supabase join queries where nested objects also need camelization.
 */
export type DeepCamelizeKeys<T> = T extends Array<infer U> ? Array<DeepCamelizeKeys<U>> : T extends object ? {
    [K in keyof T as K extends string ? SnakeToCamel<K> : K]: DeepCamelizeKeys<T[K]>;
} : T;
export type DecamelizeKeys<T> = {
    [K in keyof T as K extends string ? CamelToSnake<K> : K]: T[K];
};
/**
 * Recursively decamelizes all keys in an object type, including nested objects.
 */
export type DeepDecamelizeKeys<T> = T extends Array<infer U> ? Array<DeepDecamelizeKeys<U>> : T extends object ? {
    [K in keyof T as K extends string ? CamelToSnake<K> : K]: DeepDecamelizeKeys<T[K]>;
} : T;
