Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
81023f2
wip Outlook calendar cache
volnei Oct 17, 2025
70df5e2
enable cache for office365
volnei Oct 17, 2025
34754a2
Merge branch 'main' into calendar-cache/office365
volnei Oct 19, 2025
d0718f8
Finish office365 implementation
volnei Oct 19, 2025
a3a9d35
Merge branch 'calendar-cache/office365' of https://github.com/calcom/…
volnei Oct 19, 2025
5a5cd10
Fix initial loading
volnei Oct 19, 2025
6e06393
Add missing env.example variables
volnei Oct 19, 2025
9e4f991
test: Fix and enhance Office365 calendar subscription adapter tests
devin-ai-integration[bot] Oct 19, 2025
9d08ae0
remove dirty console.log
volnei Oct 19, 2025
766c878
test: Fix CalendarSubscriptionService test expectation
devin-ai-integration[bot] Oct 19, 2025
cd99cae
Update packages/features/calendar-subscription/adapters/Office365Cale…
volnei Oct 19, 2025
f6580d9
Update apps/web/app/api/webhooks/calendar-subscription/[provider]/rou…
volnei Oct 19, 2025
5034c14
test: Fix webhook route test expectations
devin-ai-integration[bot] Oct 19, 2025
707b31f
Merge branch 'main' into calendar-cache/office365
volnei Oct 31, 2025
6c6bf07
Update packages/features/calendar-subscription/adapters/Office365Cale…
volnei Nov 12, 2025
ae94cdf
Merge branch 'main' into calendar-cache/office365
volnei Dec 18, 2025
2cdfea7
Merge branch 'main' into calendar-cache/office365
volnei Dec 18, 2025
0bf7b6d
Merge branch 'main' into calendar-cache/office365
volnei Jan 6, 2026
cd6a87c
Merge branch 'main' into calendar-cache/office365
devin-ai-integration[bot] Jan 14, 2026
f734bf0
Merge remote-tracking branch 'origin/main' into calendar-cache/office365
volnei Feb 17, 2026
1595557
Small fixes and upgrades accordingly MS api
volnei Feb 17, 2026
6364f8c
Merge branch 'main' into calendar-cache/office365
volnei Feb 19, 2026
4594507
fix: address review feedback for Office365 calendar subscription adapter
devin-ai-integration[bot] Feb 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,12 @@ GOOGLE_WEBHOOK_TOKEN=
# Optional URL to override for tunelling webhooks. Defaults to NEXT_PUBLIC_WEBAPP_URL.
GOOGLE_WEBHOOK_URL=

# Microsoft Graph Client ID (required for Outlook calendar cache token refresh)
MS_GRAPH_CLIENT_ID=
# Microsoft Graph Client Secret (required for Outlook calendar cache token refresh)
MS_GRAPH_CLIENT_SECRET=
# Token to verify incoming webhooks from Microsoft Calendar
MICROSOFT_WEBHOOK_TOKEN=

# Optional URL to override for tunelling webhooks. Defaults to NEXT_PUBLIC_WEBAPP_URL.
MICROSOFT_WEBHOOK_URL=

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe("/api/webhooks/calendar-subscription/[provider]", () => {

expect(response.status).toBe(200);
const body = await response.json();
expect(body.message).toBe("Webhook processed");
expect(body).toEqual({});
expect(mockProcessWebhook).toHaveBeenCalledWith("google_calendar", request);
});

Expand All @@ -184,7 +184,7 @@ describe("/api/webhooks/calendar-subscription/[provider]", () => {

expect(response.status).toBe(200);
const body = await response.json();
expect(body.message).toBe("Webhook processed");
expect(body).toEqual({});
expect(mockProcessWebhook).toHaveBeenCalledWith("google_calendar", request);
});

Expand All @@ -208,7 +208,7 @@ describe("/api/webhooks/calendar-subscription/[provider]", () => {

expect(response.status).toBe(200);
const body = await response.json();
expect(body.message).toBe("Webhook processed");
expect(body).toEqual({});
expect(mockProcessWebhook).toHaveBeenCalledWith("google_calendar", request);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ async function postHandler(request: NextRequest, ctx: { params: Promise<Params>
calendarCacheEventService,
});

// only for office365 handshake validation
const url = new URL(request.url);
const validationToken = url.searchParams.get("validationToken");
if (validationToken) {
return new NextResponse(validationToken, { status: 200, headers: { "Content-Type": "text/plain" } });
}

// are features globally enabled
const [isCacheEnabled, isSyncEnabled] = await Promise.all([
calendarSubscriptionService.isCacheEnabled(),
Expand All @@ -79,7 +86,7 @@ async function postHandler(request: NextRequest, ctx: { params: Promise<Params>
}

await calendarSubscriptionService.processWebhook(providerFromParams, request);
return NextResponse.json({ message: "Webhook processed" }, { status: 200 });
return NextResponse.json({}, { status: 200 });
} catch (error) {
log.error("Error processing webhook", { error });
const message = error instanceof Error ? error.message : "Unknown error";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class DefaultAdapterFactory implements AdapterFactory {
* @returns
*/
getProviders(): CalendarSubscriptionProvider[] {
// TODO: add "office365_calendar" once the adapter is validated in production
const providers: CalendarSubscriptionProvider[] = ["google_calendar"];
return providers;
}
Expand Down
Loading
Loading