mailgun.js 9.2.0 → 9.2.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 +12 -0
- package/Classes/common/FormDataBuilder.d.ts +1 -1
- package/README.md +18 -6
- 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,18 @@
|
|
|
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.2.1](https://github.com/mailgun/mailgun.js/compare/v9.2.0...v9.2.1) (2023-08-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Node.js native FormData issue ([f00dd57](https://github.com/mailgun/mailgun.js/commits/f00dd57137334e663b01dc833deefad2f36b23f6))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Other changes
|
|
14
|
+
|
|
15
|
+
* Update readme for events ([83996c9](https://github.com/mailgun/mailgun.js/commits/83996c95fce7d8ecc3f2c5b8fcd0241500a7b1a5))
|
|
16
|
+
|
|
5
17
|
## [9.2.0](https://github.com/mailgun/mailgun.js/compare/v9.1.2...v9.2.0) (2023-07-07)
|
|
6
18
|
|
|
7
19
|
|
|
@@ -4,7 +4,7 @@ declare class FormDataBuilder {
|
|
|
4
4
|
private FormDataConstructor;
|
|
5
5
|
constructor(FormDataConstructor: InputFormData);
|
|
6
6
|
createFormData(data: any): NodeFormData | FormData;
|
|
7
|
-
private
|
|
7
|
+
private isFormDataPackage;
|
|
8
8
|
private getAttachmentOptions;
|
|
9
9
|
private addMimeDataToFD;
|
|
10
10
|
private addFilesToFD;
|
package/README.md
CHANGED
|
@@ -97,6 +97,7 @@ The following service methods are available to instantiated clients. The example
|
|
|
97
97
|
- [assignIp](#assignip)
|
|
98
98
|
- [events](#events)
|
|
99
99
|
- [get](#get-1)
|
|
100
|
+
- [Example with Date and *Filter field*](#example-with-date-and-filter-field)
|
|
100
101
|
- [stats](#stats)
|
|
101
102
|
- [getDomain](#getdomain)
|
|
102
103
|
- [getAccount](#getaccount)
|
|
@@ -898,13 +899,15 @@ Method naming conventions:
|
|
|
898
899
|
|
|
899
900
|
- #### get
|
|
900
901
|
|
|
901
|
-
`mg.events.get(domain,
|
|
902
|
+
`mg.events.get(domain, data)`
|
|
902
903
|
|
|
903
904
|
Example:
|
|
904
905
|
|
|
905
906
|
```js
|
|
906
|
-
mg.events.get('foobar.example.com', {
|
|
907
|
-
|
|
907
|
+
mg.events.get('foobar.example.com', {
|
|
908
|
+
page: 'mypageid',
|
|
909
|
+
event: 'opened'
|
|
910
|
+
}).then(data => console.log(data.items)) // logs array of event objects
|
|
908
911
|
.catch(err => console.error(err)); // logs any error
|
|
909
912
|
```
|
|
910
913
|
|
|
@@ -918,8 +921,17 @@ Method naming conventions:
|
|
|
918
921
|
| end | The end of the search time range. It can be specified as a string (see Date Format) or linux epoch seconds. Refer to Time Range for details. |
|
|
919
922
|
| ascending | Defines the direction of the search time range if the range end time is not specified. Can be either yes or no. Refer to Time Range for details. |
|
|
920
923
|
| limit | Number of entries to return. (300 max) |
|
|
921
|
-
|
|
|
922
|
-
|
|
924
|
+
| **field** | **field** is the name of the *[Filter Field](https://documentation.mailgun.com/en/latest/api-events.html#filter-field)*. The value of the parameter should be a valid Filter Expression. Several field filters can be specified in one request. If the same field is mentioned, more then once, then all its filter expressions are combined with AND operator. |
|
|
925
|
+
- #### Example with Date and *Filter field*
|
|
926
|
+
```js
|
|
927
|
+
const date = new Date(2023, 7, 2, 0, 0, 0, 0); // Wed Aug 02 2023 00:00:00 GMT+0300
|
|
928
|
+
const events = await mg.events.get('foobar.example.com', {
|
|
929
|
+
begin: date.toUTCString(), // 'Tue, 01 Aug 2023 21:00:00 GMT'
|
|
930
|
+
ascending: 'yes',
|
|
931
|
+
limit: 5,
|
|
932
|
+
event: 'delivered'
|
|
933
|
+
});
|
|
934
|
+
```
|
|
923
935
|
Promise returns: items (array of event objects), pages (paging keys grouped by id)
|
|
924
936
|
|
|
925
937
|
```JS
|
|
@@ -1477,7 +1489,7 @@ Method naming conventions:
|
|
|
1477
1489
|
|
|
1478
1490
|
Promise returns: response body
|
|
1479
1491
|
|
|
1480
|
-
```
|
|
1492
|
+
```js
|
|
1481
1493
|
{
|
|
1482
1494
|
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ],
|
|
1483
1495
|
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT',
|