# Outlook Plugin

## What it is responsible for

The Outlook Plugin manages calendar-event synchronization with Microsoft Outlook by creating and updating appointments, representing dates with timezone information, organizers or recipients, recurrence patterns, and event-property enums. It also addresses Microsoft Graph HTTP 429 `ApplicationThrottled` failures during calendar synchronization: `matchingPamsCalendarWithOutlookCalendar` had made rapid sequential Graph calls and exceeded the MailboxConcurrency limit. The documented change adds a 500ms delay between API calls and uses `executeWithRateLimit` to control call timing. Its calendar models also cover simplified event creation, retrieval responses, retrieval query parameters, date formatting, all-day events, and recurring weekly meetings.

## Notable members

- `matchingPamsCalendarWithOutlookCalendar` synchronizes Pams and Outlook calendars; its rapid sequential Graph calls motivated rate limiting.
- `executeWithRateLimit` manages API-call timing, including documented delay between calls.
- `Calendar` models calendar events for creating or updating appointments and recurrence.

483 entities in `Outlook_plugin`. Nothing else in this repository depends on it.

## What it is made of

Its 483 entities sit in 13 files under `Outlook_plugin`: 470 doc comments, 12 markdown docs and 1 function.

## Where work enters

- `Microsoft Graph API 429 Error Fix` — `Outlook_plugin/429_ERROR_FIX_README.md`:1
- `Deployment Readiness Checklist for Pams Outlook Add-in` — `Outlook_plugin/DEPLOYMENT_CHECKLIST.md`:1
- `Pams Outlook Add-in Deployment Guide` — `Outlook_plugin/DEPLOYMENT_GUIDE.md`:1
- `Docker Hub Rate Limit Fix` — `Outlook_plugin/DOCKER_RATE_LIMIT_FIX.md`:1

## How this code is named

These conventions cover most of the codebase. Learning them is faster than reading an index —
each one lets you find any member of its family without looking it up.

| Pattern | Where | Count | Examples |
|---|---|---|---|
| `check*` | exported symbols | 14 | `checkConfirmation`, `checkExistingAuth`, `checkIfAttachmentExist`, `checkPermissionToCreate` |
| `*.service.ts` | across the repository | 6 | `auth.service.ts`, `account.service.ts`, `contact.service.ts`, `activity.service.ts` |
| `*.model.ts` | across the repository | 6 | `auth.model.ts`, `account.model.ts`, `contact.model.ts`, `activity.model.ts` |
| `matching*` | exported symbols | 5 | `matchingPamsCalendarWithOutlookCalendar`, `matchingPamsCalendarWithOutlookCalendar()` |
