dhaga.docs
API referenceClasses

GoogleCalendarProvider

Defined in: calendar/google-provider.ts:29

Google Calendar provider (see ./types.ts). Reads free/busy only via the calendar.freebusy scope; one of several CalendarProvider implementations.

Implements

Constructors

Constructor

new GoogleCalendarProvider(): GoogleCalendarProvider;

Returns

GoogleCalendarProvider

Properties

id

id: string = "google";

Defined in: calendar/google-provider.ts:30

Stable id persisted on every connection row (e.g. "google", "microsoft").

Implementation of

CalendarProvider.id


label

label: string = "Google Calendar";

Defined in: calendar/google-provider.ts:31

Human label for the connect button ("Google Calendar").

Implementation of

CalendarProvider.label

Methods

isConfigured()

isConfigured(): boolean;

Defined in: calendar/google-provider.ts:33

True when this provider's app credentials are present in the environment.

Returns

boolean

Implementation of

CalendarProvider.isConfigured


getAuthUrl()

getAuthUrl(__namedParameters): string;

Defined in: calendar/google-provider.ts:37

Build the provider's consent URL. state is an opaque, caller-signed CSRF/return token; redirectUri is our callback route for this provider.

Parameters

__namedParameters
state

string

redirectUri

string

Returns

string

Implementation of

CalendarProvider.getAuthUrl


exchangeCode()

exchangeCode(__namedParameters): Promise<CalendarTokens>;

Defined in: calendar/google-provider.ts:50

Exchange an authorization code for tokens (called from the callback route).

Parameters

__namedParameters
code

string

redirectUri

string

Returns

Promise<CalendarTokens>

Implementation of

CalendarProvider.exchangeCode


refresh()

refresh(refreshToken): Promise<CalendarTokens | null>;

Defined in: calendar/google-provider.ts:76

Refresh an expired access token. Returns null when refresh is impossible (no refresh token / revoked) — the caller then marks the connection as needing reconnect rather than crashing the whole free/busy read.

Parameters

refreshToken

string

Returns

Promise<CalendarTokens | null>

Implementation of

CalendarProvider.refresh


listBusy()

listBusy(__namedParameters): Promise<BusyInterval[]>;

Defined in: calendar/google-provider.ts:102

Read busy intervals within range for the connected account.

Parameters

__namedParameters
accessToken

string

range

TimeRange

Returns

Promise<BusyInterval[]>

Implementation of

CalendarProvider.listBusy

On this page