import { Call, CallDoc, CallQueryOptions, CallUpdateParams } from "../index"; import type { CountOpts, DateRange, ToolExecution, CallStatus } from "./calls.types"; import { Filter, ObjectId } from "mongodb"; import { DashboardHeatmapMetric } from "./dashboard/calls.dashboard.types"; export declare const getCallsCollection: () => import("mongodb").Collection; export declare const getCallByCallSid: (callSid: string) => Promise | null>; export declare const getCallsByPhoneNumber: (phoneNumber: string) => Promise[]>; export declare const getCallsByClient: (clientId: string) => Promise[]>; export declare const getCallsByFlow: (flowId: ObjectId) => Promise[]>; export declare const createCallDoc: (call: Omit) => Promise>; export declare const updateCallByCallSid: (callSid: string, updates: CallUpdateParams) => Promise; export declare const getToolExecutionsByCallSid: (callSid: string, opts?: Pick & { clientId?: string; }) => Promise; export declare const updateCallStatusByCallSid: (callSid: string, status: CallStatus) => Promise; export declare const pushToolExecution: (callSid: string, execution: ToolExecution) => Promise; export declare const getCallsByClientAndDateRange: (clientId: string, startDate: Date, endDate: Date) => Promise[]>; export declare const findCallsByQuery: (query: Filter, options?: CallQueryOptions) => Promise; export declare const countCalls: (query: Filter) => Promise; export declare function countCallsByPhoneInRange(customerPhoneNumber: string, opts?: CountOpts, range?: DateRange): Promise; export declare const range: { between: (since: Date, until: Date) => DateRange; todayToNow: () => DateRange; yesterday: () => DateRange; todayFull: () => DateRange; startOfDayToNow: (d: Date) => DateRange; }; export declare function startOfDay(d?: Date): Date; export declare function addDays(d: Date, days: number): Date; /** * Aggregate calls stats for a date range (createdAt in [startStr, endStr] in timezone). * completed = agentHungUp=true or status='completed'. */ export declare function getCallsStatsForDateRange(clientId: string, startStr: string, endStr: string, timezone: string): Promise<{ count: number; totalLen: number; completed: number; }>; /** * Aggregate calls by hour for a given date (createdAt converted to given timezone). Hour format "HH:mm". */ export declare function getCallsHourlyAggregation(clientId: string, dateStr: string, timezone: string): Promise; //# sourceMappingURL=calls.getters.d.ts.map