feat(calendar): add application date integrations

This commit is contained in:
cesnimda
2026-08-31 22:24:38 +02:00
parent caf486dceb
commit 1152e05687
10 changed files with 547 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
# Calendar integrations
Jobjakt can add an application's follow-up date or deadline to Google Calendar or Outlook Calendar. The same workspace panel always offers a portable `.ics` download, which requires no provider account.
## Provider configuration
Calendar access reuses the encrypted OAuth connections already used for Gmail and Microsoft Graph mail. No calendar tokens or credentials are stored separately.
### Google
1. Enable the Google Calendar API in the Google Cloud project used by `GMAIL_CLIENT_ID` / `GMAIL_CLIENT_SECRET`.
2. Keep the existing Gmail OAuth callback URI registered.
3. Reconnect Google from Settings. The consent request now includes `https://www.googleapis.com/auth/calendar.events`.
### Microsoft
1. In the Entra application used by `MICROSOFT_GRAPH_CLIENT_ID` / `MICROSOFT_GRAPH_CLIENT_SECRET`, add the delegated `Calendars.ReadWrite` permission.
2. Keep the existing Microsoft Graph OAuth callback URI registered.
3. Reconnect Outlook from Settings and grant the new permission.
Existing connections remain valid for mail. The application reports them as connected but not calendar-writable until the user reconnects and grants the new scope.
## Behaviour and rollback
- Calendar writes happen only after an explicit user action in an application workspace.
- Jobjakt sends the job title, company, location, next-action text, and selected date; it never sends the CV or job description.
- Google uses a deterministic event ID, and Microsoft receives a deterministic transaction ID, reducing duplicate events when a request is retried.
- Disable or remove the provider's delegated calendar permission to stop direct writes. `.ics` download remains available.
- No database migration is required.