export interface CallRecord {
  readonly id: string;
  readonly deviceId: string;
  readonly externalId: string;
  readonly address: string | null;
  readonly normalizedAddress: string | null;
  readonly contactName: string | null;
  readonly direction: string | null; // incoming | outgoing
  readonly callType: string | null; // telephony | facetime_video | facetime_audio
  readonly answered: boolean | null;
  readonly durationSeconds: number | null;
  readonly startedAt: string | null;
  readonly serviceProvider: string | null;
  readonly syncedAt: string;
}

export interface CallDraft {
  readonly id: string;
  readonly deviceId: string;
  readonly externalId: string;
  readonly address: string | null;
  readonly normalizedAddress: string | null;
  readonly contactName: string | null;
  readonly direction: string | null;
  readonly callType: string | null;
  readonly answered: boolean | null;
  readonly durationSeconds: number | null;
  readonly startedAt: string | null;
  readonly serviceProvider: string | null;
}

export interface CallFilter {
  readonly deviceId?: string;
  readonly direction?: string;
  readonly callType?: string;
  /** ISO-8601 lower bound on `started_at` (exclusive) — recent-calls window for triage. */
  readonly since?: string;
  readonly limit?: number;
  readonly offset?: number;
}
