import type { AxiosInstance } from 'axios'; import type { CustomerConfig, ConversationOptions } from '../types.js'; /** * Pull conversations for a customer and save incrementally. */ export declare function pullConversations(client: AxiosInstance, customer: CustomerConfig, options?: ConversationOptions, verbose?: boolean): Promise; /** One turn of a session chronicle (a row in the Conversations UI). */ export interface SessionChronicleAct { readonly datetime: string; readonly speaker: 'agent' | 'user'; readonly type: string; readonly message: string; readonly flow_idn?: string; readonly skill_idn?: string; readonly external_event_id?: string; readonly runtime_context_id?: string; } export interface SessionChronicle { readonly session_id: string; readonly personas: ReadonlyArray<{ readonly id: string; readonly name: string; }>; readonly actor_ids: readonly string[]; readonly total_acts: number; readonly acts: readonly SessionChronicleAct[]; readonly generated_at: string; } /** * Fetch the act chronicle (dialog) for a single conversation session. * * Two-step resolution that works with an api-key-exchanged token: * 1. GET user-personas?session_id=... — server-side filters to the persona(s) * tied to this session (this query DOES honor session_id for api-key tokens). * 2. For each non-service actor, GET chat/history?user_actor_id=... (paginated) * for the transcript. * * Why not the direct acts?session_id endpoint the Builder UI uses: it returns * 403 "account_id field missing" for api-key-exchanged tokens (it needs a * logged-in user token). chat/history also does not carry per-act session_id, * so the session→transcript link is made through persona/actor, not by * filtering acts on session_id. As a result the transcript is scoped to the * resolved actor(s); for per-session personas (e.g. sandbox/test runs) that is * exactly one session, but a long-lived actor may span several sessions. */ export declare function pullConversationBySession(client: AxiosInstance, sessionId: string, verbose?: boolean): Promise; /** One row of the merged full-session timeline. */ export interface SessionFullEntry { readonly datetime: string; readonly kind: 'message' | 'call' | 'operation' | 'event'; readonly speaker?: 'agent' | 'user'; readonly text?: string; readonly name?: string; readonly flow_idn?: string; readonly skill_idn?: string; readonly model?: string; readonly level?: string; readonly external_event_id?: string; } export interface SessionFullChronicle { readonly session_id: string; readonly personas: ReadonlyArray<{ readonly id: string; readonly name: string; }>; readonly actor_ids: readonly string[]; readonly window: { readonly from: string; readonly to: string; } | null; readonly total_messages: number; readonly total_log_entries: number; readonly partial: boolean; readonly timeline: readonly SessionFullEntry[]; readonly generated_at: string; } /** * Assemble the fullest api-key-reachable view of a single session. * * @param padEndMinutes how far past the last dialog turn to keep collecting * logs (the post-call report/assessment fires minutes after the last turn). * @param maxLogEntries total log-entry budget across all actors. Busy sessions * can have tens of thousands of skill calls; this bounds the fetch (and the * YAML size). When hit, `partial` is set true. */ export declare function pullSessionFull(client: AxiosInstance, sessionId: string, verbose?: boolean, padEndMinutes?: number, maxLogEntries?: number): Promise; //# sourceMappingURL=conversations.d.ts.map