mailgun.js 9.0.1 → 9.1.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.
- package/CHANGELOG.md +17 -0
- package/README.md +41 -13
- package/Types/Suppressions/Suppressions.d.ts +1 -0
- package/mailgun.node.js.LICENSE.txt +1 -1
- package/mailgun.web.js.LICENSE.txt +1 -1
- package/package.json +1 -1
- package/version.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [9.1.0](https://github.com/mailgun/mailgun.js/compare/v9.0.1...v9.1.0) (2023-06-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Add tags property for unsubscribe data type ([3a02a50](https://github.com/mailgun/mailgun.js/commits/3a02a50bc824ed2393075a262399f3e660cf771c))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Other changes
|
|
14
|
+
|
|
15
|
+
* Add issues template ([c7e8515](https://github.com/mailgun/mailgun.js/commits/c7e85152f7cc725a15612385c090a4f794461a78))
|
|
16
|
+
* Add to release commit TS docs files ([7c7376e](https://github.com/mailgun/mailgun.js/commits/7c7376e1fd3802e79c5259b74418aa8063e4e2f7))
|
|
17
|
+
* Freshest docs ([5258cda](https://github.com/mailgun/mailgun.js/commits/5258cda2b1864e4f71681db1549df8b90daa8ca6))
|
|
18
|
+
* Rename issue template file ([4f7857d](https://github.com/mailgun/mailgun.js/commits/4f7857db8b0e331c89d2e6e3a19aa47c87bf3e39))
|
|
19
|
+
* Update readme with a link to docs ([371a46f](https://github.com/mailgun/mailgun.js/commits/371a46f8c20d5418d6389df769eabd4e957f7732))
|
|
20
|
+
* Update typedoc to use markdown ([393c6f1](https://github.com/mailgun/mailgun.js/commits/393c6f186cd2416c0e2802aa50848bf6556a1a15))
|
|
21
|
+
|
|
5
22
|
### [9.0.1](https://github.com/mailgun/mailgun.js/compare/v9.0.0...v9.0.1) (2023-06-06)
|
|
6
23
|
|
|
7
24
|
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Starting from version **9.0.0.** Interfaces and Enums can be imported in the nex
|
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
### Generated docs
|
|
76
|
-
The list of all available Types, Interfaces and Enums is auto-generated and located in the docs/ folder.
|
|
76
|
+
The list of all available Types, Interfaces and Enums is auto-generated and located in the [docs](./docs/modules.md) folder.
|
|
77
77
|
|
|
78
78
|
## Methods
|
|
79
79
|
|
|
@@ -101,9 +101,22 @@ The following service methods are available to instantiated clients. The example
|
|
|
101
101
|
- [getAccount](#getaccount)
|
|
102
102
|
- [suppressions](#suppressions)
|
|
103
103
|
- [list](#list-1)
|
|
104
|
+
- [Bounces Example](#bounces-example)
|
|
105
|
+
- [Unsubscribes Example](#unsubscribes-example)
|
|
106
|
+
- [Complaints Example](#complaints-example)
|
|
104
107
|
- [get](#get-2)
|
|
108
|
+
- [Bounces Example](#bounces-example-1)
|
|
109
|
+
- [Unsubscribes Example](#unsubscribes-example-1)
|
|
110
|
+
- [Complaints Example](#complaints-example-1)
|
|
105
111
|
- [create](#create-2)
|
|
112
|
+
- [Bounces Example](#bounces-example-2)
|
|
113
|
+
- [Unsubscribes Example](#unsubscribes-example-2)
|
|
114
|
+
- [Unsubscribe from particular tags](#unsubscribe-from-particular-tags)
|
|
115
|
+
- [Complaints Example](#complaints-example-2)
|
|
106
116
|
- [destroy](#destroy-1)
|
|
117
|
+
- [Bounces Example](#bounces-example-3)
|
|
118
|
+
- [Unsubscribes Example](#unsubscribes-example-3)
|
|
119
|
+
- [Complaints Example](#complaints-example-3)
|
|
107
120
|
- [webhooks](#webhooks)
|
|
108
121
|
- [list](#list-2)
|
|
109
122
|
- [get](#get-3)
|
|
@@ -924,7 +937,7 @@ Method naming conventions:
|
|
|
924
937
|
|
|
925
938
|
`mg.suppressions.list(domain, suppressionType, query?)`
|
|
926
939
|
|
|
927
|
-
- Bounces Example:
|
|
940
|
+
- #### Bounces Example:
|
|
928
941
|
|
|
929
942
|
```js
|
|
930
943
|
mg.suppressions.list('foobar.example.com', 'bounces')
|
|
@@ -932,7 +945,7 @@ Method naming conventions:
|
|
|
932
945
|
.catch(err => console.error(err)); // logs any error
|
|
933
946
|
```
|
|
934
947
|
|
|
935
|
-
- Unsubscribes Example:
|
|
948
|
+
- #### Unsubscribes Example:
|
|
936
949
|
|
|
937
950
|
```js
|
|
938
951
|
mg.suppressions.list('foobar.example.com', 'unsubscribes')
|
|
@@ -940,7 +953,7 @@ Method naming conventions:
|
|
|
940
953
|
.catch(err => console.error(err)); // logs any error
|
|
941
954
|
```
|
|
942
955
|
|
|
943
|
-
- Complaints Example:
|
|
956
|
+
- #### Complaints Example:
|
|
944
957
|
|
|
945
958
|
```js
|
|
946
959
|
mg.suppressions.list('foobar.example.com', 'complaints')
|
|
@@ -973,7 +986,7 @@ Method naming conventions:
|
|
|
973
986
|
|
|
974
987
|
`mg.suppressions.get(domain, suppressionType, address)`
|
|
975
988
|
|
|
976
|
-
- Bounces Example:
|
|
989
|
+
- #### Bounces Example:
|
|
977
990
|
|
|
978
991
|
```js
|
|
979
992
|
mg.suppressions.get('foobar.example.com', 'bounces', 'address@example.com')
|
|
@@ -981,7 +994,7 @@ Method naming conventions:
|
|
|
981
994
|
.catch(err => console.error(err)); // logs any error
|
|
982
995
|
```
|
|
983
996
|
|
|
984
|
-
- Unsubscribes Example:
|
|
997
|
+
- #### Unsubscribes Example:
|
|
985
998
|
|
|
986
999
|
```js
|
|
987
1000
|
mg.suppressions.get('foobar.example.com', 'unsubscribes', 'address@example.com')
|
|
@@ -989,7 +1002,7 @@ Method naming conventions:
|
|
|
989
1002
|
.catch(err => console.error(err)); // logs any error
|
|
990
1003
|
```
|
|
991
1004
|
|
|
992
|
-
- Complaints Example:
|
|
1005
|
+
- #### Complaints Example:
|
|
993
1006
|
|
|
994
1007
|
```js
|
|
995
1008
|
mg.suppressions.get('foobar.example.com', 'complaints', 'address@example.com')
|
|
@@ -1011,7 +1024,7 @@ Method naming conventions:
|
|
|
1011
1024
|
- #### create
|
|
1012
1025
|
`mg.suppressions.create(domain, suppressionType, data || data[])`
|
|
1013
1026
|
|
|
1014
|
-
- Bounces Example:
|
|
1027
|
+
- #### Bounces Example:
|
|
1015
1028
|
```JS
|
|
1016
1029
|
mg.suppressions.create('foobar.example.com', 'bounces', [{address: 'bob@example.com'}])
|
|
1017
1030
|
.then(msg => console.log(msg)) // logs response data
|
|
@@ -1035,7 +1048,7 @@ Method naming conventions:
|
|
|
1035
1048
|
}
|
|
1036
1049
|
```
|
|
1037
1050
|
|
|
1038
|
-
- Unsubscribes Example:
|
|
1051
|
+
- #### Unsubscribes Example:
|
|
1039
1052
|
|
|
1040
1053
|
```js
|
|
1041
1054
|
mg.suppressions.create('foobar.example.com', 'unsubscribes', [{address: 'bob@example.com'}])
|
|
@@ -1049,6 +1062,7 @@ Method naming conventions:
|
|
|
1049
1062
|
|:-----------|:-----------------------------------------------------------------------------------------------------------------|
|
|
1050
1063
|
| address | Valid email address |
|
|
1051
1064
|
| tag | Tag to unsubscribe from, use * to unsubscribe an address from all domain’s correspondence (optional, default: *) |
|
|
1065
|
+
| tags | Array with tags to unsubscribe from |
|
|
1052
1066
|
| created_at | Timestamp of a bounce event in RFC2822 format (optional, default: current time) |
|
|
1053
1067
|
|
|
1054
1068
|
Promise returns:
|
|
@@ -1059,7 +1073,21 @@ Method naming conventions:
|
|
|
1059
1073
|
}
|
|
1060
1074
|
```
|
|
1061
1075
|
|
|
1062
|
-
|
|
1076
|
+
- #### Unsubscribe from particular tags
|
|
1077
|
+
```js
|
|
1078
|
+
mg.suppressions.create('foobar.example.com', 'unsubscribes', [{address: 'bob@example.com', tags: ['your_tag_to_unsubscribe', 'another_tag_to_unsubscribe']}])
|
|
1079
|
+
.then(msg => console.log(msg)) // logs response data
|
|
1080
|
+
.catch(err => console.error(err)); // logs any error
|
|
1081
|
+
```
|
|
1082
|
+
Promise returns:
|
|
1083
|
+
|
|
1084
|
+
```JS
|
|
1085
|
+
{
|
|
1086
|
+
message: "1 address has been added to the unsubscribes table"
|
|
1087
|
+
}
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
- #### Complaints Example:
|
|
1063
1091
|
|
|
1064
1092
|
```js
|
|
1065
1093
|
mg.suppressions.create('foobar.example.com', 'complaints', [{address: 'bob@example.com'}])
|
|
@@ -1085,7 +1113,7 @@ Method naming conventions:
|
|
|
1085
1113
|
- #### destroy
|
|
1086
1114
|
`mg.suppressions.destroy(domain, suppressionType, address)`
|
|
1087
1115
|
|
|
1088
|
-
- Bounces Example:
|
|
1116
|
+
- #### Bounces Example:
|
|
1089
1117
|
|
|
1090
1118
|
```JS
|
|
1091
1119
|
mg.suppressions.destroy('foobar.example.com', 'bounces', 'bob@example.com')
|
|
@@ -1104,7 +1132,7 @@ Method naming conventions:
|
|
|
1104
1132
|
}
|
|
1105
1133
|
```
|
|
1106
1134
|
|
|
1107
|
-
- Unsubscribes Example:
|
|
1135
|
+
- #### Unsubscribes Example:
|
|
1108
1136
|
|
|
1109
1137
|
```js
|
|
1110
1138
|
mg.suppressions.destroy('foobar.example.com', 'unsubscribes', 'bob@example.com')
|
|
@@ -1123,7 +1151,7 @@ Method naming conventions:
|
|
|
1123
1151
|
}
|
|
1124
1152
|
```
|
|
1125
1153
|
|
|
1126
|
-
- Complaints Example:
|
|
1154
|
+
- #### Complaints Example:
|
|
1127
1155
|
|
|
1128
1156
|
```js
|
|
1129
1157
|
mg.suppressions.destroy('foobar.example.com', 'complaints', 'bob@example.com')
|
package/package.json
CHANGED
package/version.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.0
|
|
1
|
+
9.1.0
|