dhaga.docs
API referenceClasses

MicrosoftCalendarProvider

Defined in: calendar/microsoft-provider.ts:27

Microsoft (Graph) calendar provider (see ./types.ts): reads busy blocks via calendarView + showAs.

Implements

Constructors

Constructor

new MicrosoftCalendarProvider(): MicrosoftCalendarProvider;

Returns

MicrosoftCalendarProvider

Properties

id

id: string = "microsoft";

Defined in: calendar/microsoft-provider.ts:28

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

Implementation of

CalendarProvider.id


label

label: string = "Microsoft Calendar";

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

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

Implementation of

CalendarProvider.label

Methods

isConfigured()

isConfigured(): boolean;

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

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/microsoft-provider.ts:35

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/microsoft-provider.ts:47

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/microsoft-provider.ts:63

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/microsoft-provider.ts:79

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