mailgun.js 9.1.0 → 9.1.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.
- package/CHANGELOG.md +13 -0
- package/Classes/Suppressions/SuppressionsClient.d.ts +3 -2
- package/README.md +15 -2
- package/mailgun.node.js +2 -2
- package/mailgun.node.js.LICENSE.txt +1 -1
- package/mailgun.web.js +2 -2
- 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,19 @@
|
|
|
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.1](https://github.com/mailgun/mailgun.js/compare/v9.1.0...v9.1.1) (2023-06-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Creating one unsubscribe with the tag property ([6f27372](https://github.com/mailgun/mailgun.js/commits/6f2737229d14977093e4f8076c053be77002322c))
|
|
11
|
+
* Replace models map by object to remove eslint warning ([1faada1](https://github.com/mailgun/mailgun.js/commits/1faada106b50bb05ddac0b5af1b139264059a12b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Other changes
|
|
15
|
+
|
|
16
|
+
* Readme update ([3ccc575](https://github.com/mailgun/mailgun.js/commits/3ccc57535ac6d4eda46b12b5cad398c4eb11ff9d))
|
|
17
|
+
|
|
5
18
|
## [9.1.0](https://github.com/mailgun/mailgun.js/compare/v9.0.1...v9.1.0) (2023-06-16)
|
|
6
19
|
|
|
7
20
|
|
|
@@ -5,7 +5,7 @@ import { IBounce, IComplaint, ISuppressionClient, IUnsubscribe, IWhiteList } fro
|
|
|
5
5
|
import { SuppressionList, SuppressionListResponse, SuppressionDataType, SuppressionCreationData, SuppressionCreationResult, SuppressionListQuery, SuppressionDestroyResult } from '../../Types/Suppressions';
|
|
6
6
|
export default class SuppressionClient extends NavigationThruPages<SuppressionList> implements ISuppressionClient {
|
|
7
7
|
request: Request;
|
|
8
|
-
models:
|
|
8
|
+
models: object;
|
|
9
9
|
constructor(request: Request);
|
|
10
10
|
protected parseList(response: SuppressionListResponse, Model: {
|
|
11
11
|
new (data: SuppressionDataType): IBounce | IComplaint | IUnsubscribe | IWhiteList;
|
|
@@ -14,7 +14,8 @@ export default class SuppressionClient extends NavigationThruPages<SuppressionLi
|
|
|
14
14
|
new (dataType: SuppressionDataType): T;
|
|
15
15
|
}): T;
|
|
16
16
|
private createWhiteList;
|
|
17
|
-
private
|
|
17
|
+
private createUnsubscribe;
|
|
18
|
+
private getModel;
|
|
18
19
|
private prepareResponse;
|
|
19
20
|
list(domain: string, type: string, query?: SuppressionListQuery): Promise<SuppressionList>;
|
|
20
21
|
get(domain: string, type: string, address: string): Promise<IBounce | IComplaint | IUnsubscribe | IWhiteList>;
|
package/README.md
CHANGED
|
@@ -111,6 +111,7 @@ The following service methods are available to instantiated clients. The example
|
|
|
111
111
|
- [create](#create-2)
|
|
112
112
|
- [Bounces Example](#bounces-example-2)
|
|
113
113
|
- [Unsubscribes Example](#unsubscribes-example-2)
|
|
114
|
+
- [Unsubscribe from one tag](#unsubscribe-from-one-tag)
|
|
114
115
|
- [Unsubscribe from particular tags](#unsubscribe-from-particular-tags)
|
|
115
116
|
- [Complaints Example](#complaints-example-2)
|
|
116
117
|
- [destroy](#destroy-1)
|
|
@@ -1042,7 +1043,7 @@ Method naming conventions:
|
|
|
1042
1043
|
|
|
1043
1044
|
Promise returns:
|
|
1044
1045
|
|
|
1045
|
-
```
|
|
1046
|
+
```js
|
|
1046
1047
|
{
|
|
1047
1048
|
message: "1 address has been added to the bounces table"
|
|
1048
1049
|
}
|
|
@@ -1051,7 +1052,7 @@ Method naming conventions:
|
|
|
1051
1052
|
- #### Unsubscribes Example:
|
|
1052
1053
|
|
|
1053
1054
|
```js
|
|
1054
|
-
mg.suppressions.create('foobar.example.com', 'unsubscribes',
|
|
1055
|
+
mg.suppressions.create('foobar.example.com', 'unsubscribes', {address: 'bob@example.com'})
|
|
1055
1056
|
.then(msg => console.log(msg)) // logs response data
|
|
1056
1057
|
.catch(err => console.error(err)); // logs any error
|
|
1057
1058
|
```
|
|
@@ -1072,7 +1073,19 @@ Method naming conventions:
|
|
|
1072
1073
|
message: "1 address has been added to the unsubscribes table"
|
|
1073
1074
|
}
|
|
1074
1075
|
```
|
|
1076
|
+
- #### Unsubscribe from one tag
|
|
1077
|
+
```js
|
|
1078
|
+
mg.suppressions.create('foobar.example.com', 'unsubscribes', {address: 'bob@example.com', tag: 'your_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:
|
|
1075
1083
|
|
|
1084
|
+
```JS
|
|
1085
|
+
{
|
|
1086
|
+
message: "1 address has been added to the unsubscribes table"
|
|
1087
|
+
}
|
|
1088
|
+
```
|
|
1076
1089
|
- #### Unsubscribe from particular tags
|
|
1077
1090
|
```js
|
|
1078
1091
|
mg.suppressions.create('foobar.example.com', 'unsubscribes', [{address: 'bob@example.com', tags: ['your_tag_to_unsubscribe', 'another_tag_to_unsubscribe']}])
|