* Transforms a raw Jira attachment object into typed output.
(att: any)
| 7 | * Transforms a raw Jira attachment object into typed output. |
| 8 | */ |
| 9 | function transformAttachment(att: any) { |
| 10 | return { |
| 11 | id: att.id ?? '', |
| 12 | filename: att.filename ?? '', |
| 13 | mimeType: att.mimeType ?? '', |
| 14 | size: att.size ?? 0, |
| 15 | content: att.content ?? '', |
| 16 | thumbnail: att.thumbnail ?? null, |
| 17 | author: transformUser(att.author), |
| 18 | authorName: att.author?.displayName ?? att.author?.accountId ?? 'Unknown', |
| 19 | created: |
| 20 | typeof att.created === 'number' ? new Date(att.created).toISOString() : (att.created ?? ''), |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export const jiraGetAttachmentsTool: ToolConfig< |
| 25 | JiraGetAttachmentsParams, |
nothing calls this directly
no test coverage detected