email-forward-parser 1.6.0 → 1.7.0

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 +44 -0
  2. package/package.json +3 -2
package/lib/index.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ declare module "email-forward-parser" {
2
+ class EmailForwardParser {
3
+ read(
4
+ body: string,
5
+ subject?: string,
6
+ ): {
7
+ forwarded: boolean
8
+ message: string | null
9
+ email: {
10
+ body: string
11
+ from: {
12
+ address: string
13
+ name: string | null
14
+ }
15
+ to:
16
+ | {
17
+ address: string
18
+ name: string | null
19
+ }
20
+ | {
21
+ address: string
22
+ name: string | null
23
+ }[]
24
+ | null
25
+ | undefined
26
+ cc:
27
+ | {
28
+ address: string
29
+ name: string | null
30
+ }
31
+ | {
32
+ address: string
33
+ name: string | null
34
+ }[]
35
+ | null
36
+ | undefined
37
+ subject: string | null
38
+ date: string | null
39
+ }
40
+ }
41
+ }
42
+
43
+ export default EmailForwardParser
44
+ }
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "email-forward-parser",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
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",
@@ -23,7 +24,7 @@
23
24
  "nodeunit-x": "0.15.0"
24
25
  },
25
26
  "dependencies": {
26
- "re2": "1.20.7"
27
+ "re2": "1.21.4"
27
28
  },
28
29
  "keywords": [
29
30
  "parser",