Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: outlook 365 calendar endpoints #15077

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

Ryukemeister
Copy link
Contributor

@Ryukemeister Ryukemeister commented May 16, 2024

What does this PR do?

This PR adds the endpoints for the microsoft outlook calendar. The frontend can be done in a follow PR once the endpoints are merged. Also added some e2e tests for case where access token or origin might be invalid and also when all the credentials are good

Copy link

linear bot commented May 16, 2024

Copy link
Contributor

github-actions bot commented May 16, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels May 16, 2024
@graphite-app graphite-app bot requested a review from a team May 16, 2024 11:22
@dosubot dosubot bot added api area: API, enterprise API, access token, OAuth calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar ✨ feature New feature or request labels May 16, 2024
Copy link

socket-security bot commented May 16, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 4:45pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 30, 2024 4:45pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 30, 2024 4:45pm

Copy link

graphite-app bot commented May 16, 2024

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (05/16/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

github-actions bot commented May 16, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented May 16, 2024

Current Playwright Test Results Summary

✅ 42 Passing - ❌ 1 Failing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/17/2024 08:47:50pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ddcdddb

Started: 05/17/2024 08:46:42pm UTC

❌ Failures

📄   apps/web/playwright/teams.e2e.ts • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Teams - NonOrg -- future Can create a booking for Round Robin EventType
Retry 2Retry 1Initial Attempt
Error: expect(received).toBe(expected) // Object.is equality...
expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false
6.82% (18) 18 / 264 runs
failed over last 7 days
25% (66) 66 / 264 runs
flaked over last 7 days

⚠️ Flakes

📄   apps/web/playwright/signup.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Signup Flow Test Email verification sent if enabled
Retry 1Initial Attempt
1.13% (3) 3 / 266 runs
failed over last 7 days
24.44% (65) 65 / 266 runs
flaked over last 7 days

View Detailed Build Results


@CLAassistant
Copy link

CLAassistant commented May 30, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ThyMinimalDev
✅ Ryukemeister
❌ Rajiv Sahal


Rajiv Sahal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

export const OFFICE_365_CALENDAR_TYPE = "office365_calendar";
export const OFFICE_365_CALENDAR_ID = "office365-calendar";
export const GOOGLE_CALENDAR = "google";
export const MICROSOFT_OUTLOOK_CALENDAR = "google";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

office365


export interface CalendarApp {
save(state: string, code: string, origin: string): Promise<{ url: string }>;
check(userId: number): Promise<{ status: string }>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check(userId: number): Promise<ApiResponse>;

}

export interface OAuthCalendarApp extends CalendarApp {
connect(authorization: string, req: Request): Promise<{ status: string; data: { authUrl: string } }>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connect(authorization: string, req: Request): Promise<ApiResponse<{ authUrl: string }>>

const origin = req.get("origin") ?? req.get("host");
const redirectUrl = await await this.getCalendarRedirectUrl(accessToken, origin ?? "");

return { status: "SUCCESS", data: { authUrl: redirectUrl } };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ status: SUCCESS_STATUS, data: { authUrl: redirectUrl } };

const origin = req.get("origin") ?? req.get("host");
const redirectUrl = await await this.getCalendarRedirectUrl(accessToken, origin ?? "");

return { status: "SUCCESS", data: { authUrl: redirectUrl } };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUCCESS_STATUS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api area: API, enterprise API, access token, OAuth calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar core area: core, team members only ✨ feature New feature or request platform Anything related to our platform plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants