email-forward-parser 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.d.ts +46 -0
  2. package/package.json +2 -1
package/lib/index.d.ts ADDED
@@ -0,0 +1,46 @@
1
+ declare module "email-forward-parser" {
2
+ class EmailForwardParser {
3
+ constructor()
4
+
5
+ read(
6
+ body: string,
7
+ subject?: string,
8
+ ): {
9
+ forwarded: boolean
10
+ message: string | null
11
+ email: {
12
+ body: string
13
+ from: {
14
+ address: string
15
+ name: string | null
16
+ }
17
+ to:
18
+ | {
19
+ address: string
20
+ name: string | null
21
+ }
22
+ | {
23
+ address: string
24
+ name: string | null
25
+ }[]
26
+ | null
27
+ | undefined
28
+ cc:
29
+ | {
30
+ address: string
31
+ name: string | null
32
+ }
33
+ | {
34
+ address: string
35
+ name: string | null
36
+ }[]
37
+ | null
38
+ | undefined
39
+ subject: string | null
40
+ date: string | null
41
+ }
42
+ }
43
+ }
44
+
45
+ export default EmailForwardParser
46
+ }
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "email-forward-parser",
3
- "version": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "description": "Parses forwarded emails and extract content",
5
5
  "author": "Eliott Vincent <eliott@crisp.chat>",
6
6
  "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
7
8
  "homepage": "https://github.com/crisp-oss/email-forward-parser",
8
9
  "repository": {
9
10
  "type": "git",