mailgun.js 10.3.0 → 11.0.0
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 +25 -0
- package/Classes/Domains/domain.d.ts +10 -7
- package/Classes/Domains/domainsClient.d.ts +29 -4
- package/Classes/Domains/domainsTemplates.d.ts +2 -2
- package/Classes/MailgunClient.d.ts +2 -0
- package/Classes/Metrics/MetricsClient.d.ts +14 -0
- package/Interfaces/Domains/DomainsClient.d.ts +3 -3
- package/Interfaces/MailgunClient/IMailgunClient.d.ts +2 -0
- package/Interfaces/Metrics/MetricsClient.d.ts +5 -0
- package/README.md +1105 -289
- package/Types/Domains/DomainTracking.d.ts +6 -5
- package/Types/Domains/Domains.d.ts +51 -26
- package/Types/Metrics/Metrics.d.ts +100 -0
- package/Types/Metrics/MetricsAPI.d.ts +20 -0
- package/Types/Metrics/index.d.ts +2 -0
- 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
|
@@ -36,13 +36,14 @@ export type UpdateDomainTrackingResponse = {
|
|
|
36
36
|
body: UpdatedOpenTracking;
|
|
37
37
|
};
|
|
38
38
|
export type OpenTrackingInfo = {
|
|
39
|
-
|
|
39
|
+
place_at_the_top?: 'yes' | 'no' | 'true' | 'false' | boolean;
|
|
40
|
+
active: 'yes' | 'no' | 'true' | 'false' | boolean;
|
|
40
41
|
};
|
|
41
42
|
export type ClickTrackingInfo = {
|
|
42
|
-
active
|
|
43
|
+
active?: 'yes' | 'no' | 'true' | 'false' | 'htmlonly' | boolean;
|
|
43
44
|
};
|
|
44
45
|
export type UnsubscribeTrackingInfo = {
|
|
45
|
-
active
|
|
46
|
-
html_footer
|
|
47
|
-
text_footer
|
|
46
|
+
active?: 'yes' | 'no' | 'true' | 'false' | boolean;
|
|
47
|
+
html_footer?: string;
|
|
48
|
+
text_footer?: string;
|
|
48
49
|
};
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
export type DomainsQuery = {
|
|
2
|
-
authority?: string;
|
|
3
|
-
state?: 'active' | 'unverified' | 'disabled';
|
|
4
2
|
limit?: number;
|
|
5
3
|
skip?: number;
|
|
4
|
+
state?: 'active' | 'unverified' | 'disabled';
|
|
5
|
+
sort?: 'name:asc' | 'name: desc';
|
|
6
|
+
authority?: string;
|
|
7
|
+
search?: string;
|
|
6
8
|
};
|
|
7
9
|
export type DomainUpdateInfo = {
|
|
8
10
|
spam_action?: 'disabled' | 'block' | 'tag';
|
|
9
11
|
web_scheme?: 'http' | 'https';
|
|
10
12
|
wildcard?: boolean | 'true' | 'false';
|
|
13
|
+
mailfrom_host?: string;
|
|
14
|
+
message_ttl?: number;
|
|
15
|
+
smtp_password?: string;
|
|
16
|
+
use_automatic_sender_security?: boolean | 'true' | 'false';
|
|
17
|
+
web_prefix?: string;
|
|
11
18
|
};
|
|
12
|
-
export type DomainUpdateInfoReq = DomainUpdateInfo & {
|
|
19
|
+
export type DomainUpdateInfoReq = Omit<DomainUpdateInfo, 'message_ttl'> & {
|
|
13
20
|
wildcard?: 'true' | 'false';
|
|
21
|
+
use_automatic_sender_security?: 'true' | 'false';
|
|
14
22
|
};
|
|
15
23
|
export type DomainInfo = DomainUpdateInfo & {
|
|
16
24
|
name: string;
|
|
17
|
-
|
|
18
|
-
force_dkim_authority?: boolean | 'true' | 'false';
|
|
25
|
+
dkim_host_name?: string;
|
|
19
26
|
dkim_key_size?: 1024 | 2048;
|
|
20
|
-
|
|
27
|
+
dkim_selector?: string;
|
|
28
|
+
encrypt_incoming_message?: boolean | 'true' | 'false';
|
|
29
|
+
force_dkim_authority?: boolean | 'true' | 'false';
|
|
30
|
+
force_root_dkim_host?: boolean | 'true' | 'false';
|
|
21
31
|
pool_id?: '';
|
|
32
|
+
ips?: '';
|
|
22
33
|
};
|
|
23
34
|
export type DomainInfoReq = DomainInfo & {
|
|
24
35
|
force_dkim_authority?: 'true' | 'false';
|
|
25
36
|
};
|
|
26
37
|
export type BoolToString = {
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
encrypt_incoming_message: DomainInfo['encrypt_incoming_message'];
|
|
39
|
+
force_dkim_authority: DomainInfo['force_dkim_authority'];
|
|
40
|
+
force_root_dkim_host: DomainInfo['force_root_dkim_host'];
|
|
41
|
+
wildcard: DomainInfo['wildcard'];
|
|
42
|
+
use_automatic_sender_security: DomainInfo['use_automatic_sender_security'];
|
|
29
43
|
};
|
|
30
|
-
export type
|
|
44
|
+
export type DomainData = {
|
|
45
|
+
id: string;
|
|
46
|
+
is_disabled: boolean;
|
|
47
|
+
web_prefix: string;
|
|
48
|
+
web_scheme: string;
|
|
49
|
+
use_automatic_sender_security: boolean;
|
|
31
50
|
name: string;
|
|
32
51
|
require_tls: boolean;
|
|
33
52
|
skip_verification: boolean;
|
|
@@ -38,14 +57,10 @@ export type DomainShortData = {
|
|
|
38
57
|
smtp_password: string;
|
|
39
58
|
smtp_login: string;
|
|
40
59
|
type: string;
|
|
60
|
+
dkim_host?: string;
|
|
61
|
+
mailfrom_host?: string;
|
|
41
62
|
};
|
|
42
|
-
export
|
|
43
|
-
id: string;
|
|
44
|
-
is_disabled: boolean;
|
|
45
|
-
web_prefix: string;
|
|
46
|
-
web_scheme: string;
|
|
47
|
-
};
|
|
48
|
-
export interface DomainsListItem extends DomainShortData {
|
|
63
|
+
export interface DomainsListItem extends DomainData {
|
|
49
64
|
receiving_dns_records: null;
|
|
50
65
|
sending_dns_records: null;
|
|
51
66
|
}
|
|
@@ -81,13 +96,11 @@ export type DestroyedDomainResponse = {
|
|
|
81
96
|
body: MessageResponse;
|
|
82
97
|
};
|
|
83
98
|
export type ConnectionSettings = {
|
|
84
|
-
require_tls
|
|
85
|
-
skip_verification
|
|
99
|
+
require_tls?: boolean;
|
|
100
|
+
skip_verification?: boolean;
|
|
86
101
|
};
|
|
87
102
|
export type ConnectionSettingsResponse = {
|
|
88
|
-
body:
|
|
89
|
-
connection: ConnectionSettings;
|
|
90
|
-
};
|
|
103
|
+
body: ConnectionSettings;
|
|
91
104
|
status: number;
|
|
92
105
|
};
|
|
93
106
|
export type UpdatedConnectionSettings = {
|
|
@@ -118,6 +131,9 @@ export type UpdatedDKIMSelectorResponse = {
|
|
|
118
131
|
body: MessageResponse;
|
|
119
132
|
status: number;
|
|
120
133
|
};
|
|
134
|
+
export type UpdatedDKIMSelectorResult = MessageResponse & {
|
|
135
|
+
status: number;
|
|
136
|
+
};
|
|
121
137
|
export type WebPrefixInfo = {
|
|
122
138
|
webPrefix: string;
|
|
123
139
|
};
|
|
@@ -139,14 +155,23 @@ export type TDomain = {
|
|
|
139
155
|
state: string;
|
|
140
156
|
wildcard: boolean;
|
|
141
157
|
spam_action: string;
|
|
142
|
-
created_at:
|
|
158
|
+
created_at: Date;
|
|
143
159
|
smtp_password: string;
|
|
144
160
|
smtp_login: string;
|
|
145
161
|
type: string;
|
|
146
162
|
receiving_dns_records: DNSRecord[] | null;
|
|
147
163
|
sending_dns_records: DNSRecord[] | null;
|
|
148
|
-
id
|
|
149
|
-
is_disabled
|
|
150
|
-
web_prefix
|
|
151
|
-
web_scheme
|
|
164
|
+
id: string;
|
|
165
|
+
is_disabled: boolean;
|
|
166
|
+
web_prefix: string;
|
|
167
|
+
web_scheme: string;
|
|
168
|
+
use_automatic_sender_security: boolean;
|
|
169
|
+
message?: string;
|
|
170
|
+
dkim_host?: string;
|
|
171
|
+
mailfrom_host?: string;
|
|
172
|
+
};
|
|
173
|
+
export type DomainDynamicPropsType = Pick<DomainData, 'dkim_host' | 'mailfrom_host'>;
|
|
174
|
+
export type DomainGetQuery = {
|
|
175
|
+
extended?: boolean;
|
|
176
|
+
with_dns?: boolean;
|
|
152
177
|
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Resolution } from '../../Enums';
|
|
2
|
+
export type MetricsFilterValue = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
export type MetricsFilter = {
|
|
7
|
+
attribute: string;
|
|
8
|
+
comparator: string;
|
|
9
|
+
values: MetricsFilterValue[];
|
|
10
|
+
};
|
|
11
|
+
export type MetricsQuery = {
|
|
12
|
+
start?: Date | string;
|
|
13
|
+
end?: Date | string;
|
|
14
|
+
resolution?: Resolution;
|
|
15
|
+
duration?: string;
|
|
16
|
+
dimensions?: string[];
|
|
17
|
+
metrics?: string[];
|
|
18
|
+
filter?: {
|
|
19
|
+
AND: MetricsFilter[];
|
|
20
|
+
};
|
|
21
|
+
include_subaccounts?: boolean;
|
|
22
|
+
include_aggregates?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type Metrics = {
|
|
25
|
+
accepted_outgoing_count?: number;
|
|
26
|
+
delivered_smtp_count?: number;
|
|
27
|
+
accepted_count?: number;
|
|
28
|
+
delivered_http_count?: number;
|
|
29
|
+
accepted_incoming_count?: number;
|
|
30
|
+
delivered_optimized_count?: number;
|
|
31
|
+
stored_count?: number;
|
|
32
|
+
delivered_count?: number;
|
|
33
|
+
processed_count?: number;
|
|
34
|
+
sent_count?: number;
|
|
35
|
+
opened_count?: number;
|
|
36
|
+
unique_opened_count?: number;
|
|
37
|
+
clicked_count?: number;
|
|
38
|
+
unique_clicked_count?: number;
|
|
39
|
+
complained_count?: number;
|
|
40
|
+
permanent_failed_count?: number;
|
|
41
|
+
failed_count?: number;
|
|
42
|
+
rate_limit_count?: number;
|
|
43
|
+
unsubscribed_count?: number;
|
|
44
|
+
temporary_failed_count?: number;
|
|
45
|
+
permanent_failed_optimized_count?: number;
|
|
46
|
+
bounced_count?: number;
|
|
47
|
+
esp_block_count?: number;
|
|
48
|
+
webhook_count?: number;
|
|
49
|
+
delayed_bounce_count?: number;
|
|
50
|
+
soft_bounces_count?: number;
|
|
51
|
+
permanent_failed_old_count?: number;
|
|
52
|
+
suppressed_bounces_count?: number;
|
|
53
|
+
delivered_subsequent_count?: number;
|
|
54
|
+
delivered_rate?: string;
|
|
55
|
+
delayed_first_attempt_count?: number;
|
|
56
|
+
unsubscribed_rate?: string;
|
|
57
|
+
delivered_first_attempt_count?: number;
|
|
58
|
+
opened_rate?: string;
|
|
59
|
+
suppressed_complaints_count?: number;
|
|
60
|
+
delivered_two_plus_attempts_count?: number;
|
|
61
|
+
hard_bounces_count?: number;
|
|
62
|
+
suppressed_unsubscribed_count?: number;
|
|
63
|
+
unique_opened_rate?: string;
|
|
64
|
+
fail_rate?: string;
|
|
65
|
+
complained_rate?: string;
|
|
66
|
+
clicked_rate?: string;
|
|
67
|
+
unique_clicked_rate?: string;
|
|
68
|
+
bounce_rate?: string;
|
|
69
|
+
delayed_rate?: string;
|
|
70
|
+
permanent_fail_rate?: string;
|
|
71
|
+
temporary_fail_rate?: string;
|
|
72
|
+
};
|
|
73
|
+
export type MetricsPagination = {
|
|
74
|
+
sort: string;
|
|
75
|
+
skip: number;
|
|
76
|
+
limit: number;
|
|
77
|
+
total: number;
|
|
78
|
+
};
|
|
79
|
+
export type MetricsDimension = {
|
|
80
|
+
dimension: string;
|
|
81
|
+
value: string;
|
|
82
|
+
display_value: string;
|
|
83
|
+
};
|
|
84
|
+
export type MetricsResponseItem = {
|
|
85
|
+
dimensions: MetricsDimension[];
|
|
86
|
+
metrics: Metrics;
|
|
87
|
+
};
|
|
88
|
+
export type MetricsResult = {
|
|
89
|
+
items: MetricsResponseItem[];
|
|
90
|
+
resolution: string;
|
|
91
|
+
start: Date | null;
|
|
92
|
+
aggregates: {
|
|
93
|
+
metrics: Metrics;
|
|
94
|
+
};
|
|
95
|
+
dimensions: string[];
|
|
96
|
+
pagination: MetricsPagination;
|
|
97
|
+
end: Date | null;
|
|
98
|
+
duration?: string;
|
|
99
|
+
status: number;
|
|
100
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Metrics, MetricsPagination, MetricsQuery, MetricsResponseItem } from './Metrics';
|
|
2
|
+
export type MetricsAPIQuery = Omit<MetricsQuery, 'start' | 'end'> & {
|
|
3
|
+
start?: string;
|
|
4
|
+
end?: string;
|
|
5
|
+
};
|
|
6
|
+
export type MetricsAPIResponse = {
|
|
7
|
+
status: number;
|
|
8
|
+
body: {
|
|
9
|
+
items: MetricsResponseItem[];
|
|
10
|
+
resolution: string;
|
|
11
|
+
start: string;
|
|
12
|
+
aggregates: {
|
|
13
|
+
metrics: Metrics;
|
|
14
|
+
};
|
|
15
|
+
dimensions: string[];
|
|
16
|
+
pagination: MetricsPagination;
|
|
17
|
+
end: string;
|
|
18
|
+
duration?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|