import { TimeRange } from '../time_range.ts';
import type { JsonValue } from '../../types.ts';
import { type TokenManager } from '../google/client.ts';
export declare const PAGE_LIMIT = "gcal: listing exceeded 50 pages; narrow the date range";
/**
 * List the account's calendars.
 *
 * showHidden is left at its default (false) so the mount shows what the
 * Calendar UI shows; a subscribed holiday calendar the user hid stays out.
 */
export declare function listCalendars(tokenManager: TokenManager, minAccessRole?: string): Promise<Record<string, JsonValue>[]>;
/**
 * List a calendar's events overlapping a time window.
 *
 * timeMin bounds an event's END and timeMax its START, both exclusive, so
 * the pair is an overlap query: a multi-day or midnight-crossing event is
 * returned by every day window it touches, with no extra request.
 *
 * singleEvents expands a recurring series into its instances, which is what
 * makes a day directory well defined; without it the series' own record
 * would stand in for every occurrence.
 */
export declare function listEvents(tokenManager: TokenManager, calendarId: string, timeMin: string | null, timeMax: string, timeZone?: string, scope?: TimeRange, query?: string): Promise<Record<string, JsonValue>[]>;
/**
 * Whether a listing of the window `lo`..`hi` (epoch seconds) keeps an event
 * spanning `span` (epoch ms): one that starts before the window ends and ends
 * after it starts, or an instant one at or after its start. Mirrors Python's
 * `listed`.
 */
export declare function listed(span: readonly [number, number], lo: number, hi: number): boolean;
/**
 * A calendar's events changed since `syncToken`, every event when null, and
 * the token the next sync starts from. Instances of a recurring series come one
 * by one (singleEvents), as a listing names them, and one deleted since the
 * token comes back with status `cancelled`. Calendar answers 410 for a token it
 * no longer honors, which rejects as any failed call does. Mirrors Python's
 * `sync_events`.
 */
export declare function syncEvents(tokenManager: TokenManager, calendarId: string, syncToken: string | null, timeZone?: string): Promise<[Record<string, JsonValue>[], string | null]>;
/** Delete one event. */
export declare function deleteEvent(tokenManager: TokenManager, calendarId: string, eventId: string): Promise<void>;
//# sourceMappingURL=client.d.ts.map