mailgun.js 6.0.1 → 7.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,49 @@
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
+ ### [7.0.2](https://github.com/mailgun/mailgun.js/compare/v7.0.1...v7.0.2) (2022-06-14)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Add boolean values handling in message create ([ff91208](https://github.com/mailgun/mailgun.js/commits/ff91208aac087913df51563928b76583ba1eac05))
11
+
12
+ ### [7.0.1](https://github.com/mailgun/mailgun.js/compare/v7.0.0...v7.0.1) (2022-06-10)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * Update max body length configuration. Fix Axios error handling ([cbc4182](https://github.com/mailgun/mailgun.js/commits/cbc4182db59ec6e41aada0eaad5fbf39a344d4b6))
18
+
19
+ ## [7.0.0](https://github.com/mailgun/mailgun.js/compare/v6.0.1...v7.0.0) (2022-05-19)
20
+
21
+
22
+ ### ⚠ BREAKING CHANGES
23
+
24
+ * Replaced ky with axios
25
+
26
+ ### Features
27
+
28
+ * Fix tests. Improve error handling ([063e3ee](https://github.com/mailgun/mailgun.js/commits/063e3eedcd7d55b59bd32e521aa053be0a8d3101))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * Correct handling of options body. Add header for form-data ([e2e210d](https://github.com/mailgun/mailgun.js/commits/e2e210d919ca1a68d76ed4c4aa93cc1178f6ebba))
34
+ * Corrected test to check body and not improper status code ([d11cd39](https://github.com/mailgun/mailgun.js/commits/d11cd39a1316c34bac0bc437bb43d4f8797cd3bd))
35
+ * Refactored ky usage with axios ([df4da91](https://github.com/mailgun/mailgun.js/commits/df4da916f10a0653d1a7e3ed8243f02bd3b824e1))
36
+ * Removed console.log ([b4e21c7](https://github.com/mailgun/mailgun.js/commits/b4e21c74b218f92a8292237aa8fe8b2af91b4b81))
37
+
38
+
39
+ ### Other changes
40
+
41
+ * Update docs and readme ([1ccaeac](https://github.com/mailgun/mailgun.js/commits/1ccaeaca4ed954985b2ee9a0c0e7666c2f8f6b0f))
42
+
43
+
44
+ ### Breaking changes
45
+
46
+ * Replaced ky with axios ([142bb7a](https://github.com/mailgun/mailgun.js/commits/142bb7ada1671c31a636d89efd7ffc62afaf3671))
47
+
5
48
  ### [6.0.1](https://github.com/mailgun/mailgun.js/compare/v6.0.0...v6.0.1) (2022-05-10)
6
49
 
7
50
 
package/README.md CHANGED
@@ -175,7 +175,7 @@ v:my-var | v: prefix followed by an arbitrary name allows to attach a c
175
175
  from: "Excited User <mailgun@sandbox-123.mailgun.org>",
176
176
  to: ["test@example.com"],
177
177
  subject: "Hello",
178
- text: "<mime encoded string here>"
178
+ message: "<mime encoded string here>"
179
179
  })
180
180
  .then(msg => console.log(msg)) // logs response data
181
181
  .catch(err => console.log(err)); // logs any error
@@ -1446,6 +1446,7 @@ Response shape:
1446
1446
  "id": "name_of_the_list",
1447
1447
  "quantity": 40,
1448
1448
  "records_processed": 40,
1449
+ "responseStatusCode": 200,
1449
1450
  "status": "uploaded",
1450
1451
  "summary": {
1451
1452
  "result": {
@@ -1875,5 +1876,5 @@ git pull
1875
1876
 
1876
1877
  Next, run ```npm run release```.
1877
1878
 
1878
- After that, run ```npm login``` and ```npm publish``` to publish changes on npm.
1879
+ After that, `cd ./dist` and then run ```npm login``` and ```npm publish``` to publish changes on npm.
1879
1880
 
@@ -1,13 +1,15 @@
1
+ import { AxiosRequestHeaders } from 'axios';
1
2
  import Options from './Options';
2
3
  export interface OnCallEmptyHeaders {
3
4
  [key: string]: undefined;
4
5
  }
5
6
  export interface RequestOptions extends Options {
6
- headers: any;
7
+ headers: AxiosRequestHeaders;
7
8
  timeout: number;
8
9
  }
9
10
  export interface OnCallRequestOptions {
10
11
  timeout?: number;
11
- headers?: HeadersInit | OnCallEmptyHeaders;
12
+ headers?: AxiosRequestHeaders;
13
+ query?: any;
12
14
  [key: string]: unknown | undefined;
13
15
  }