# fileLibraryItemsOnDeal

fileLibraryItemsOnContact for a deal's files: a snapshot copy of each Library file, a page as its PDF. Library item ids, never a chat artifactId (that is attachDealFile). Undo with removeDealFile (the copy's `uploadedFileId`).

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "fileLibraryItemsOnDeal", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `itemIds`: `[ID!]!` (required)
- `dealId`: `ID!` (required)

## Response (data, an example)

```json
{
  "spacesMutation": {
    "fileOnDeal": [
      {
        "uploadedFileId": "<ID>",
        "itemId": "<ID>",
        "fileName": "…",
        "contentType": "…",
        "sizeBytes": 0
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "fileLibraryItemsOnDeal",
    "variables": {
      "itemIds": [
        "<itemIds>"
      ],
      "dealId": "<dealId>"
    }
  }'
```
