postal-mime.d.ts 571 B

123456789101112131415161718192021222324252627282930313233
  1. export default class PostalMime {
  2. parse(data: string): Promise<Email>;
  3. }
  4. export interface Header {
  5. key: string;
  6. value: string;
  7. }
  8. export interface Address {
  9. address: string;
  10. name: string;
  11. }
  12. export interface Attachment {
  13. filename: string;
  14. mimeType: string;
  15. disposition: "attachment" | "inline" | null;
  16. related: boolean;
  17. contentId: string;
  18. content: ArrayBuffer;
  19. }
  20. export interface Email {
  21. headers: Header[];
  22. from?: Address;
  23. to?: Address[];
  24. subject?: string;
  25. date?: string;
  26. text?: string;
  27. html?: string;
  28. attachments: Attachment[];
  29. }