import { BaseExecutionContext, ConversationMetadata } from "../types/utility.js";
import { ConversationSelect, MessageSelect } from "../types/entities.js";

//#region src/utils/conversations.d.ts
declare const generateId: (size?: number) => string;
/**
 * Derive a deterministic 32-character hex ID from natural key parts.
 * Used for junction/relation table IDs so the same logical relation
 * always produces the same ID regardless of which branch creates it.
 */
declare function deriveRelationId(...parts: string[]): string;
/**
 * Generates a standardized conversation ID.
 *
 * The generated ID follows these rules:
 * 1. Always lowercase
 * 2. No leading hyphens
 *
 * @returns A unique conversation ID
 *
 * @example
 * ```typescript
 * const id = getConversationId(); // returns something like "v1stgxr8z5jdhi6bmyt"
 * ```
 */
declare function getConversationId(): string;
declare function buildConversationMetadata(executionContext: BaseExecutionContext, _userProperties?: Record<string, unknown>): ConversationMetadata | undefined;
declare function getConversationUserProperties(c: Pick<ConversationSelect, 'userProperties'>): Record<string, unknown> | null;
declare function getConversationProperties(c: Pick<ConversationSelect, 'properties'>): Record<string, unknown> | null;
declare function getMessageUserProperties(m: Pick<MessageSelect, 'userProperties'>, c?: Pick<ConversationSelect, 'userProperties'>): Record<string, unknown> | null;
declare function buildConversationUserProperties(_executionContext: BaseExecutionContext, userProperties?: Record<string, unknown>): Record<string, unknown> | undefined;
//#endregion
export { buildConversationMetadata, buildConversationUserProperties, deriveRelationId, generateId, getConversationId, getConversationProperties, getConversationUserProperties, getMessageUserProperties };