# Attachement

## What it is responsible for

Attachement manages attachment-oriented data and operations around Outlook and Pams-facing flows. Its entry symbols `Attachement`, `OutlookAttachment`, `RelatedToTypes`, and `CheckAttachmentWithFilesResponse` frame attachment handling, related-type selection, and attachment/file response data. `getAllMailAttachments` and `getOutlookAttachmentContent` indicate mail-attachment retrieval and Outlook attachment-content access, while `uploadFilesToOneDrive` and `uploadFilesData` cover file-upload paths. Supporting types such as `PamsAttachment`, `PamsFileData`, `Tag`, and `FilesRoles` carry named attachment, file, tag, and role concepts.

## What it needs, and who needs it

Attachement depends on [Auth](subsystem-outlook-plugin-src-auth) and [Pams](subsystem-pams). Auth and Pams are required by this subsystem’s attachment flows; without those dependencies, calls and models named `fetchTagsListByType`, `fetchFilePermissionByTypeAndRelatedToId`, and `fetchCategoriesListForAttachment` cannot operate as this boundary intends. Conversely, Auth, [Activity](subsystem-outlook-plugin-src-activity), and `Outlook_plugin/src/taskpane` depend on Attachement. Those consumers would lose their declared dependency on symbols including `AttachmentProcessResult`, `PamsApiResponse`, and `returnRelatedToTypes` if this subsystem were absent entirely.

23 entities in `Outlook_plugin/src/attachement`. **3 other subsystems depend on it**, which makes it the 3rd most depended-upon part of this codebase.

## What it is made of

Its 23 entities sit in 2 files under `Outlook_plugin/src/attachement`: 8 functions, 7 classes, 4 interfaces, 2 constants and 2 more.
`attachement.model.ts` holds 15 of them — more than any other file here.

## Where work enters

- [`Attachement`](service-attachement) — `Outlook_plugin/src/attachement/attachement.service.ts`:1
- [`OutlookAttachment`](interface-outlookattachment) — `Outlook_plugin/src/attachement/attachement.model.ts`:22
- [`RelatedToTypes`](enum-relatedtotypes-4) — `Outlook_plugin/src/attachement/attachement.model.ts`:37
- [`CheckAttachmentWithFilesResponse`](class-checkattachmentwithfilesresponse) — `Outlook_plugin/src/attachement/attachement.model.ts`:77

## Boundaries

**3 other subsystems depend on this one** — `Auth`, `Activity`, `Taskpane`. Changing what it exposes changes them.

Those 3 hold 19 edges between them, unevenly: `Taskpane` reaches in across 16 edges, while another holds one. 19 edges arrive against 9 leaving — more of this repository reaches into it than it reaches out to. What they reach is narrower than the folder: 16 of its 23 members carry every inbound edge — `CheckAttachmentWithFilesResponse` (2), `RelatedToTypes` (2) and `Tag` (2), plus 13 more. Of the 9 it sends out, 5 go to `Auth` — more than to any other.

It depends on `Auth`, `Pams`, and on nothing else in this repository.
