({msgId, email, accessToken})
| 37 | } |
| 38 | |
| 39 | export async function getMessageMimeType({msgId, email, accessToken}) { |
| 40 | const {payload} = await getMessage({msgId, email, accessToken, format: 'metadata', metaHeaders: ['content-type']}); |
| 41 | const contentType = extractMailHeader(payload, 'Content-Type'); |
| 42 | const {protocol} = parseQuery(contentType, ';'); |
| 43 | return {mimeType: payload.mimeType, protocol}; |
| 44 | } |
| 45 | |
| 46 | export async function getAttachment({email, msgId, attachmentId, fileName, accessToken}) { |
| 47 | if (!attachmentId) { |
nothing calls this directly
no test coverage detected