mailgun.js 5.0.5 → 5.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 +21 -0
- package/domains.d.ts +1 -0
- package/interfaces/StatsOptions.d.ts +1 -1
- package/interfaces/lists.d.ts +44 -0
- package/lists.d.ts +5 -1
- 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,27 @@
|
|
|
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.2.1](https://github.com/mailgun/mailgun.js/compare/v5.2.0...v5.2.1) (2022-04-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Remove invalid StatsEvent types ([61ac971](https://github.com/mailgun/mailgun.js/commits/61ac97132c384d493f84784a5daae91831bccf75))
|
|
11
|
+
|
|
12
|
+
## [5.2.0](https://github.com/mailgun/mailgun.js/compare/v5.1.0...v5.2.0) (2022-04-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Add validation methods to mailing list client ([224790c](https://github.com/mailgun/mailgun.js/commits/224790c4c20466a2203856d703b51e7d4a03a195))
|
|
18
|
+
|
|
19
|
+
## [5.1.0](https://github.com/mailgun/mailgun.js/compare/v5.0.5...v5.1.0) (2022-04-08)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* Add verify method to domains ([dd65f7b](https://github.com/mailgun/mailgun.js/commits/dd65f7b50930d4c34f1503ed4b87e0f4b8829b37))
|
|
25
|
+
|
|
5
26
|
### [5.0.5](https://github.com/mailgun/mailgun.js/compare/v5.0.4...v5.0.5) (2022-03-31)
|
|
6
27
|
|
|
7
28
|
|
package/domains.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export default class DomainClient {
|
|
|
37
37
|
list(query?: DomainsQuery): Promise<Domain[]>;
|
|
38
38
|
get(domain: string): Promise<Domain>;
|
|
39
39
|
create(data: DomainInfo): Promise<Domain>;
|
|
40
|
+
verify(domain: string): Promise<Domain>;
|
|
40
41
|
destroy(domain: string): Promise<MessageResponse>;
|
|
41
42
|
getConnection(domain: string): Promise<ConnectionSettings>;
|
|
42
43
|
updateConnection(domain: string, data: ConnectionSettings): Promise<UpdatedConnectionSettings>;
|
|
@@ -12,7 +12,7 @@ export interface StatsOptions {
|
|
|
12
12
|
resolution: string;
|
|
13
13
|
stats: Stat[];
|
|
14
14
|
}
|
|
15
|
-
export declare type StatsEvent = 'accepted' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'stored' | '
|
|
15
|
+
export declare type StatsEvent = 'accepted' | 'delivered' | 'opened' | 'clicked' | 'unsubscribed' | 'stored' | 'complained' | 'failed';
|
|
16
16
|
export interface StatsQuery {
|
|
17
17
|
event: StatsEvent | StatsEvent[];
|
|
18
18
|
start?: string | Date;
|
package/interfaces/lists.d.ts
CHANGED
|
@@ -14,6 +14,50 @@ export interface DestroyedList {
|
|
|
14
14
|
address: string;
|
|
15
15
|
message: string;
|
|
16
16
|
}
|
|
17
|
+
export interface StartValidationResult {
|
|
18
|
+
status: number;
|
|
19
|
+
id: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ValidationResponse {
|
|
23
|
+
status: string;
|
|
24
|
+
download_url: {
|
|
25
|
+
csv: string;
|
|
26
|
+
json: string;
|
|
27
|
+
};
|
|
28
|
+
id: string;
|
|
29
|
+
quantity: number;
|
|
30
|
+
records_processed: number;
|
|
31
|
+
summary: {
|
|
32
|
+
result: {
|
|
33
|
+
catch_all: number;
|
|
34
|
+
deliverable: number;
|
|
35
|
+
do_not_send: number;
|
|
36
|
+
undeliverable: number;
|
|
37
|
+
unknown: number;
|
|
38
|
+
};
|
|
39
|
+
risk: {
|
|
40
|
+
high: number;
|
|
41
|
+
low: number;
|
|
42
|
+
medium: number;
|
|
43
|
+
unknown: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface ValidationApiResponse extends ValidationResponse {
|
|
48
|
+
created_at: number;
|
|
49
|
+
}
|
|
50
|
+
export interface ValidationResultData extends ValidationResponse {
|
|
51
|
+
created_at: Date;
|
|
52
|
+
}
|
|
53
|
+
export interface ValidationResult {
|
|
54
|
+
status: number;
|
|
55
|
+
validationResult: ValidationResultData;
|
|
56
|
+
}
|
|
57
|
+
export interface CancelValidationResult {
|
|
58
|
+
status: number;
|
|
59
|
+
message: string;
|
|
60
|
+
}
|
|
17
61
|
export interface MailingList {
|
|
18
62
|
access_level: string;
|
|
19
63
|
address: string;
|
package/lists.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import Request from './request';
|
|
2
|
-
import { ListsQuery, CreateUpdateList, DestroyedList, MailingList } from './interfaces/lists';
|
|
2
|
+
import { ListsQuery, CreateUpdateList, DestroyedList, MailingList, StartValidationResult, ValidationResult, CancelValidationResult } from './interfaces/lists';
|
|
3
3
|
import { IMailListsMembers } from './interfaces/mailListMembers';
|
|
4
4
|
export default class ListsClient {
|
|
5
5
|
baseRoute: string;
|
|
6
6
|
request: Request;
|
|
7
7
|
members: IMailListsMembers;
|
|
8
8
|
constructor(request: Request, members: IMailListsMembers);
|
|
9
|
+
private parseValidationResult;
|
|
9
10
|
list(query?: ListsQuery): Promise<MailingList[]>;
|
|
10
11
|
get(mailListAddress: string): Promise<MailingList>;
|
|
11
12
|
create(data: CreateUpdateList): Promise<MailingList>;
|
|
12
13
|
update(mailListAddress: string, data: CreateUpdateList): Promise<MailingList>;
|
|
13
14
|
destroy(mailListAddress: string): Promise<DestroyedList>;
|
|
15
|
+
validate(mailListAddress: string): Promise<StartValidationResult>;
|
|
16
|
+
validationResult(mailListAddress: string): Promise<ValidationResult>;
|
|
17
|
+
cancelValidation(mailListAddress: string): Promise<CancelValidationResult>;
|
|
14
18
|
}
|