mailgun.js 7.0.3 → 7.0.4
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 +15 -0
- package/interfaces/Messages.d.ts +28 -13
- 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,21 @@
|
|
|
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.4](https://github.com/mailgun/mailgun.js/compare/v7.0.3...v7.0.4) (2022-07-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Message Data (one of text, html, template required) ([abd2862](https://github.com/mailgun/mailgun.js/commits/abd2862fcf36ca54d68dea14cb2b2658d33092ec))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Other changes
|
|
14
|
+
|
|
15
|
+
* Add content to message data ([a878cc1](https://github.com/mailgun/mailgun.js/commits/a878cc1acb0b4ca441b100278ca0fd2b47d137e3))
|
|
16
|
+
* Add propetry for mime messages ([f701cfb](https://github.com/mailgun/mailgun.js/commits/f701cfb591f08dbb882953bb2b77131fae089bad))
|
|
17
|
+
* Fix build error ([c7fcb5e](https://github.com/mailgun/mailgun.js/commits/c7fcb5e05bd84fc6ef04589bde37846a11f9466d))
|
|
18
|
+
* Fix tests ([b4791c4](https://github.com/mailgun/mailgun.js/commits/b4791c4e746a97aec359635272c2b29cb956ab6f))
|
|
19
|
+
|
|
5
20
|
### [7.0.3](https://github.com/mailgun/mailgun.js/compare/v7.0.2...v7.0.3) (2022-06-30)
|
|
6
21
|
|
|
7
22
|
|
package/interfaces/Messages.d.ts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the object has least one key present and not undefined
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://stackoverflow.com/a/49725198}
|
|
6
|
+
*/
|
|
7
|
+
export declare type AtLeastOneKeyPresent<Object_, Keys extends keyof Object_ = keyof Object_> = Pick<Object_, Exclude<keyof Object_, Keys>> & {
|
|
8
|
+
[K in Keys]-?: Required<Pick<Object_, K>> & Partial<Pick<Object_, Exclude<Keys, K>>>;
|
|
9
|
+
}[Keys];
|
|
10
|
+
export declare type MailgunMessageContent = AtLeastOneKeyPresent<{
|
|
11
|
+
/**
|
|
12
|
+
* Body of the message. (text version)
|
|
13
|
+
*/
|
|
14
|
+
text?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Body of the message. (HTML version)
|
|
17
|
+
*/
|
|
18
|
+
html?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Body of the message. (MIME version)
|
|
21
|
+
*/
|
|
22
|
+
message?: string | Buffer | Blob;
|
|
23
|
+
/**
|
|
24
|
+
* Name of a template stored via [template API](https://documentation.mailgun.com/en/latest/api-templates.html#api-templates). See [Templates](https://documentation.mailgun.com/en/latest/user_manual.html#templating) for more information
|
|
25
|
+
*/
|
|
26
|
+
template?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export declare type MailgunMessageData = MailgunMessageContent & {
|
|
2
29
|
/**
|
|
3
30
|
* Email address for `From` header
|
|
4
31
|
*/
|
|
@@ -21,14 +48,6 @@ export declare type MailgunMessageData = {
|
|
|
21
48
|
* Message subject
|
|
22
49
|
*/
|
|
23
50
|
subject?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Body of the message. (text version)
|
|
26
|
-
*/
|
|
27
|
-
text?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Body of the message. (HTML version)
|
|
30
|
-
*/
|
|
31
|
-
html?: string;
|
|
32
51
|
/**
|
|
33
52
|
* [AMP](https://developers.google.com/gmail/ampemail/) part of the message. Please follow google guidelines to compose and send AMP emails.
|
|
34
53
|
*/
|
|
@@ -45,10 +64,6 @@ export declare type MailgunMessageData = {
|
|
|
45
64
|
* You can post multiple `inline` values.
|
|
46
65
|
*/
|
|
47
66
|
inline?: any;
|
|
48
|
-
/**
|
|
49
|
-
* Name of a template stored via [template API](https://documentation.mailgun.com/en/latest/api-templates.html#api-templates). See [Templates](https://documentation.mailgun.com/en/latest/user_manual.html#templating) for more information
|
|
50
|
-
*/
|
|
51
|
-
template?: string;
|
|
52
67
|
/**
|
|
53
68
|
* Use this parameter to send a message to specific version of a template
|
|
54
69
|
*/
|