mailgun.js 5.0.1 → 5.0.2

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 CHANGED
@@ -2,6 +2,13 @@
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
+ ### [5.0.2](https://github.com/mailgun/mailgun.js/compare/v5.0.1...v5.0.2) (2022-03-14)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Make `StatsQuery` interface properties optional, add `StatsEvent` type ([91a2d6a](https://github.com/mailgun/mailgun.js/commits/91a2d6ae22f2c9cb86ee64ccab636d23926bb6d1))
11
+
5
12
  ### [5.0.1](https://github.com/mailgun/mailgun.js/compare/v5.0.0...v5.0.1) (2022-02-23)
6
13
 
7
14
 
@@ -1217,12 +1217,13 @@ declare module 'mailgun.js/interfaces/StatsOptions' {
1217
1217
  resolution: string;
1218
1218
  stats: Stat[];
1219
1219
  }
1220
+ export type StatsEvent = 'accepted' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'stored' | 'rejected' | 'complained' | 'failed-temporary' | 'failed-permanent';
1220
1221
  export interface StatsQuery {
1221
- event: string | string[];
1222
- start: string | Date;
1223
- end: string | Date;
1224
- resolution: 'hour' | 'day' | 'month';
1225
- duration: string;
1222
+ event: StatsEvent | StatsEvent[];
1223
+ start?: string | Date;
1224
+ end?: string | Date;
1225
+ resolution?: 'hour' | 'day' | 'month';
1226
+ duration?: string;
1226
1227
  }
1227
1228
  }
1228
1229
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */
4
4
 
5
- /*! mailgun.js v5.0.0 */
5
+ /*! mailgun.js v5.0.1 */
@@ -4,4 +4,4 @@
4
4
 
5
5
  /*! https://mths.be/punycode v1.3.2 by @mathias */
6
6
 
7
- /*! mailgun.js v5.0.0 */
7
+ /*! mailgun.js v5.0.1 */
@@ -14,10 +14,12 @@ export interface StatsOptions {
14
14
  stats: Stat[];
15
15
  }
16
16
 
17
+ export type StatsEvent = 'accepted' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'stored' | 'rejected' | 'complained' | 'failed-temporary' | 'failed-permanent';
18
+
17
19
  export interface StatsQuery {
18
- event: string | string[];
19
- start: string | Date;
20
- end: string | Date;
21
- resolution: 'hour'| 'day' | 'month';
22
- duration: string;
20
+ event: StatsEvent | StatsEvent[];
21
+ start?: string | Date;
22
+ end?: string | Date;
23
+ resolution?: 'hour'| 'day' | 'month';
24
+ duration?: string;
23
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailgun.js",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "main": "dist/mailgun.node.js",
5
5
  "browser": "dist/mailgun.web.js",
6
6
  "types": "dist/mailgun.js.d.ts",