MCPcopy Index your code
hub / github.com/simstudioai/sim / transformAttachment

Function transformAttachment

apps/sim/tools/jira/get_attachments.ts:9–22  ·  view source on GitHub ↗

* Transforms a raw Jira attachment object into typed output.

(att: any)

Source from the content-addressed store, hash-verified

7 * Transforms a raw Jira attachment object into typed output.
8 */
9function 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
24export const jiraGetAttachmentsTool: ToolConfig<
25 JiraGetAttachmentsParams,

Callers

nothing calls this directly

Calls 1

transformUserFunction · 0.90

Tested by

no test coverage detected