mailgun.js 8.2.2 → 9.0.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 +66 -0
- package/Classes/Domains/domain.d.ts +16 -0
- package/{domains.d.ts → Classes/Domains/domains.d.ts} +5 -8
- package/Classes/Domains/domainsClient.d.ts +36 -0
- package/{domainsCredentials.d.ts → Classes/Domains/domainsCredentials.d.ts} +3 -2
- package/{domainsTags.d.ts → Classes/Domains/domainsTags.d.ts} +6 -4
- package/{domainsTemplates.d.ts → Classes/Domains/domainsTemplates.d.ts} +9 -8
- package/{events.d.ts → Classes/Events.d.ts} +4 -3
- package/{ip-pools.d.ts → Classes/IPPools.d.ts} +4 -3
- package/Classes/IPs.d.ts +10 -0
- package/Classes/MailgunClient.d.ts +18 -0
- package/{mailListMembers.d.ts → Classes/MailingLists/mailListMembers.d.ts} +4 -3
- package/Classes/MailingLists/mailingLists.d.ts +21 -0
- package/{messages.d.ts → Classes/Messages.d.ts} +4 -3
- package/{routes.d.ts → Classes/Routes.d.ts} +4 -3
- package/Classes/Stats/StatsClient.d.ts +14 -0
- package/Classes/Stats/StatsContainer.d.ts +9 -0
- package/Classes/Suppressions/Bounce.d.ts +10 -0
- package/Classes/Suppressions/Complaint.d.ts +8 -0
- package/Classes/Suppressions/Suppression.d.ts +5 -0
- package/Classes/Suppressions/SuppressionsClient.d.ts +23 -0
- package/Classes/Suppressions/Unsubscribe.d.ts +9 -0
- package/Classes/Suppressions/WhiteList.d.ts +9 -0
- package/{multipleValidation.d.ts → Classes/Validations/multipleValidation.d.ts} +4 -3
- package/Classes/Validations/validate.d.ts +9 -0
- package/Classes/Webhooks.d.ts +21 -0
- package/Classes/common/Error.d.ts +8 -0
- package/{formDataBuilder.d.ts → Classes/common/FormDataBuilder.d.ts} +1 -1
- package/Classes/common/NavigationThruPages.d.ts +17 -0
- package/{request.d.ts → Classes/common/Request.d.ts} +2 -4
- package/Enums/index.d.ts +24 -0
- package/Interfaces/Common/Logger.d.ts +3 -0
- package/Interfaces/Common/index.d.ts +1 -0
- package/Interfaces/Domains/DomainCredentials.d.ts +7 -0
- package/Interfaces/Domains/DomainTags.d.ts +20 -0
- package/Interfaces/Domains/DomainTemplates.d.ts +23 -0
- package/Interfaces/Domains/DomainsClient.d.ts +27 -0
- package/Interfaces/Domains/index.d.ts +4 -0
- package/Interfaces/EventClient/IEventClient.d.ts +4 -0
- package/Interfaces/EventClient/index.d.ts +1 -0
- package/Interfaces/IPPools/IIPPoolsClient.d.ts +7 -0
- package/Interfaces/IPPools/index.d.ts +1 -0
- package/Interfaces/IPs/IIPsClient.d.ts +5 -0
- package/Interfaces/IPs/index.d.ts +1 -0
- package/Interfaces/MailgunClient/IMailgunClient.d.ts +24 -0
- package/Interfaces/MailgunClient/index.d.ts +1 -0
- package/Interfaces/MailingLists/MailingListMembers.d.ts +9 -0
- package/Interfaces/MailingLists/MailingListsClient.d.ts +13 -0
- package/Interfaces/MailingLists/index.d.ts +2 -0
- package/Interfaces/Messages/IMessagesClient.d.ts +4 -0
- package/Interfaces/Messages/index.d.ts +1 -0
- package/Interfaces/Routes/IRoutesClient.d.ts +8 -0
- package/Interfaces/Routes/index.d.ts +1 -0
- package/Interfaces/Stats/StatsClient.d.ts +6 -0
- package/Interfaces/Stats/StatsContainer.d.ts +7 -0
- package/Interfaces/Stats/index.d.ts +2 -0
- package/{interfaces → Interfaces}/Suppressions/Bounce.d.ts +0 -6
- package/{interfaces → Interfaces}/Suppressions/Complaint.d.ts +0 -4
- package/Interfaces/Suppressions/ISuppressionsClient.d.ts +11 -0
- package/{interfaces → Interfaces}/Suppressions/Unsubscribe.d.ts +0 -5
- package/Interfaces/Suppressions/WhiteList.d.ts +6 -0
- package/Interfaces/Suppressions/index.d.ts +5 -0
- package/Interfaces/Validations/MultipleValidation.d.ts +7 -0
- package/Interfaces/Validations/Validation.d.ts +6 -0
- package/Interfaces/Validations/index.d.ts +2 -0
- package/Interfaces/Webhooks/IWebHooksClient.d.ts +9 -0
- package/Interfaces/Webhooks/index.d.ts +1 -0
- package/Interfaces/index.d.ts +13 -0
- package/README.md +42 -13
- package/Types/Common/ApiResponse.d.ts +4 -0
- package/Types/Common/Error.d.ts +19 -0
- package/Types/Common/FormData.d.ts +7 -0
- package/{interfaces → Types/Common}/NavigationThruPages.d.ts +14 -14
- package/{interfaces → Types/Common}/RequestOptions.d.ts +7 -7
- package/Types/Common/index.d.ts +5 -0
- package/Types/Domains/DomainCredentials.d.ts +46 -0
- package/{interfaces → Types/Domains}/DomainTags.d.ts +34 -57
- package/Types/Domains/DomainTemplates.d.ts +153 -0
- package/{interfaces → Types/Domains}/DomainTracking.d.ts +8 -8
- package/{interfaces → Types/Domains}/Domains.d.ts +50 -36
- package/Types/Domains/index.d.ts +5 -0
- package/{interfaces → Types/Events}/Events.d.ts +15 -15
- package/Types/Events/index.d.ts +1 -0
- package/{interfaces → Types/IPPools}/IpPools.d.ts +6 -6
- package/Types/IPPools/index.d.ts +1 -0
- package/{interfaces/Ips.d.ts → Types/IPs/IPs.d.ts} +7 -4
- package/Types/IPs/index.d.ts +1 -0
- package/{interfaces/Options.d.ts → Types/MailgunClient/MailgunClientOptions.d.ts} +2 -3
- package/Types/MailgunClient/index.d.ts +1 -0
- package/Types/MailingLists/MailingListMembers.d.ts +60 -0
- package/{interfaces/lists.d.ts → Types/MailingLists/MailingLists.d.ts} +22 -22
- package/Types/MailingLists/index.d.ts +2 -0
- package/{interfaces → Types/Messages}/Messages.d.ts +5 -5
- package/Types/Messages/index.d.ts +1 -0
- package/{interfaces/routes.d.ts → Types/Routes/Routes.d.ts} +6 -6
- package/Types/Routes/index.d.ts +1 -0
- package/{interfaces/StatsOptions.d.ts → Types/Stats/Stats.d.ts} +6 -6
- package/Types/Stats/index.d.ts +1 -0
- package/Types/Suppressions/Bounce.d.ts +6 -0
- package/Types/Suppressions/Complaint.d.ts +4 -0
- package/{interfaces → Types}/Suppressions/Suppressions.d.ts +19 -28
- package/Types/Suppressions/Unsubscribe.d.ts +5 -0
- package/Types/Suppressions/WhiteList.d.ts +6 -0
- package/Types/Suppressions/index.d.ts +5 -0
- package/{interfaces → Types/Validations}/MultipleValidation.d.ts +20 -26
- package/{interfaces/Validate.d.ts → Types/Validations/Validation.d.ts} +4 -4
- package/Types/Validations/index.d.ts +2 -0
- package/Types/Webhooks/Webhooks.d.ts +29 -0
- package/Types/Webhooks/index.d.ts +1 -0
- package/Types/index.d.ts +13 -0
- package/index.d.ts +7 -4
- 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/client.d.ts +0 -29
- package/common/NavigationThruPages.d.ts +0 -19
- package/error.d.ts +0 -8
- package/interfaces/APIErrorOptions.d.ts +0 -11
- package/interfaces/ApiResponse.d.ts +0 -5
- package/interfaces/DomainCredentials.d.ts +0 -52
- package/interfaces/DomainTemplates.d.ts +0 -178
- package/interfaces/IFormData.d.ts +0 -7
- package/interfaces/IMailgunClient.d.ts +0 -24
- package/interfaces/Suppressions/WhiteList.d.ts +0 -12
- package/interfaces/Supressions.d.ts +0 -103
- package/interfaces/Webhooks.d.ts +0 -34
- package/interfaces/mailListMembers.d.ts +0 -68
- package/ips.d.ts +0 -9
- package/lists.d.ts +0 -20
- package/stats.d.ts +0 -20
- package/suppressions.d.ts +0 -53
- package/validate.d.ts +0 -9
- package/webhooks.d.ts +0 -32
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PagesList, ParsedPagesList } from '
|
|
3
|
-
export declare enum Resolution {
|
|
4
|
-
HOUR = "hour",
|
|
5
|
-
DAY = "day",
|
|
6
|
-
MONTH = "month"
|
|
7
|
-
}
|
|
1
|
+
import { Resolution } from '../../Enums';
|
|
2
|
+
import { PagesList, ParsedPagesList } from '../Common';
|
|
8
3
|
export type DomainTagsQuery = {
|
|
9
4
|
limit: number;
|
|
10
5
|
page?: string;
|
|
@@ -16,35 +11,35 @@ export type DomainTagsStatisticQuery = {
|
|
|
16
11
|
resolution?: Resolution;
|
|
17
12
|
duration?: string;
|
|
18
13
|
};
|
|
19
|
-
export
|
|
14
|
+
export type DomainTagsItemInfo = {
|
|
20
15
|
tag: string;
|
|
21
16
|
description: string;
|
|
22
17
|
'first-seen': string;
|
|
23
18
|
'last-seen': string;
|
|
24
|
-
}
|
|
25
|
-
export
|
|
19
|
+
};
|
|
20
|
+
export type DomainTagsItem = {
|
|
26
21
|
tag: string;
|
|
27
22
|
description: string;
|
|
28
23
|
'first-seen': Date;
|
|
29
24
|
'last-seen': Date;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
25
|
+
};
|
|
26
|
+
export type DomainTagsResponseData = {
|
|
32
27
|
status: number;
|
|
33
28
|
body: {
|
|
34
29
|
items: DomainTagsItemInfo[];
|
|
35
30
|
paging: PagesList;
|
|
36
31
|
};
|
|
37
|
-
}
|
|
38
|
-
export
|
|
32
|
+
};
|
|
33
|
+
export type DomainTagsList = {
|
|
39
34
|
status: number;
|
|
40
35
|
items: DomainTagsItem[];
|
|
41
36
|
pages: ParsedPagesList;
|
|
42
|
-
}
|
|
43
|
-
export
|
|
37
|
+
};
|
|
38
|
+
export type DomainTagsMessageRes = {
|
|
44
39
|
message: string;
|
|
45
40
|
status?: number;
|
|
46
|
-
}
|
|
47
|
-
export
|
|
41
|
+
};
|
|
42
|
+
export type DomainTagAPIResponseStatsItem = {
|
|
48
43
|
time: string;
|
|
49
44
|
accepted?: {
|
|
50
45
|
incoming: number;
|
|
@@ -88,8 +83,8 @@ export interface DomainTagAPIResponseStatsItem {
|
|
|
88
83
|
stored?: {
|
|
89
84
|
total: number;
|
|
90
85
|
};
|
|
91
|
-
}
|
|
92
|
-
export
|
|
86
|
+
};
|
|
87
|
+
export type DomainTagStatAPIResponse = {
|
|
93
88
|
body: {
|
|
94
89
|
tag: string;
|
|
95
90
|
description: string;
|
|
@@ -98,19 +93,11 @@ export interface DomainTagStatAPIResponse {
|
|
|
98
93
|
resolution: Resolution;
|
|
99
94
|
stats: DomainTagAPIResponseStatsItem[];
|
|
100
95
|
};
|
|
101
|
-
}
|
|
102
|
-
export
|
|
96
|
+
};
|
|
97
|
+
export type DomainTagStatisticItem = Omit<DomainTagAPIResponseStatsItem, 'time'> & {
|
|
103
98
|
time: Date;
|
|
104
|
-
}
|
|
105
|
-
export
|
|
106
|
-
tag: string;
|
|
107
|
-
description: string;
|
|
108
|
-
start: Date;
|
|
109
|
-
end: Date;
|
|
110
|
-
resolution: Resolution;
|
|
111
|
-
stats: DomainTagStatisticItem[];
|
|
112
|
-
}
|
|
113
|
-
export interface DomainTagCountriesAPIResponse {
|
|
99
|
+
};
|
|
100
|
+
export type DomainTagCountriesAPIResponse = {
|
|
114
101
|
body: {
|
|
115
102
|
tag: string;
|
|
116
103
|
country: {
|
|
@@ -124,8 +111,8 @@ export interface DomainTagCountriesAPIResponse {
|
|
|
124
111
|
};
|
|
125
112
|
};
|
|
126
113
|
};
|
|
127
|
-
}
|
|
128
|
-
export
|
|
114
|
+
};
|
|
115
|
+
export type DomainTagCountriesAggregation = {
|
|
129
116
|
tag: string;
|
|
130
117
|
country: {
|
|
131
118
|
[key: string]: {
|
|
@@ -137,8 +124,8 @@ export interface DomainTagCountriesAggregation {
|
|
|
137
124
|
unsubscribed: number;
|
|
138
125
|
};
|
|
139
126
|
};
|
|
140
|
-
}
|
|
141
|
-
export
|
|
127
|
+
};
|
|
128
|
+
export type DomainTagProvidersAPIResponse = {
|
|
142
129
|
body: {
|
|
143
130
|
tag: string;
|
|
144
131
|
provider: {
|
|
@@ -155,8 +142,8 @@ export interface DomainTagProvidersAPIResponse {
|
|
|
155
142
|
};
|
|
156
143
|
};
|
|
157
144
|
status: number;
|
|
158
|
-
}
|
|
159
|
-
export
|
|
145
|
+
};
|
|
146
|
+
export type DomainTagProvidersAggregation = {
|
|
160
147
|
tag: string;
|
|
161
148
|
provider: {
|
|
162
149
|
[key: string]: {
|
|
@@ -170,39 +157,29 @@ export interface DomainTagProvidersAggregation {
|
|
|
170
157
|
unsubscribed: number;
|
|
171
158
|
};
|
|
172
159
|
};
|
|
173
|
-
}
|
|
174
|
-
export
|
|
160
|
+
};
|
|
161
|
+
export type DeviceStatistic = {
|
|
175
162
|
clicked: number;
|
|
176
163
|
complained: number;
|
|
177
164
|
opened: number;
|
|
178
165
|
unique_clicked: number;
|
|
179
166
|
unique_opened: number;
|
|
180
167
|
unsubscribed: number;
|
|
181
|
-
}
|
|
182
|
-
export
|
|
168
|
+
};
|
|
169
|
+
export type DevicesTypes = {
|
|
183
170
|
desktop: DeviceStatistic;
|
|
184
171
|
mobile: DeviceStatistic;
|
|
185
172
|
tablet: DeviceStatistic;
|
|
186
173
|
unknown: DeviceStatistic;
|
|
187
|
-
}
|
|
188
|
-
export
|
|
174
|
+
};
|
|
175
|
+
export type DomainTagDevicesAPIResponse = {
|
|
189
176
|
body: {
|
|
190
177
|
tag: string;
|
|
191
178
|
device: DevicesTypes;
|
|
192
179
|
};
|
|
193
180
|
status: number;
|
|
194
|
-
}
|
|
195
|
-
export
|
|
181
|
+
};
|
|
182
|
+
export type DomainTagDevicesAggregation = {
|
|
196
183
|
tag: string;
|
|
197
184
|
device: DevicesTypes;
|
|
198
|
-
}
|
|
199
|
-
export interface IDomainTagsClient {
|
|
200
|
-
list(domain: string): Promise<DomainTagsList>;
|
|
201
|
-
get(domain: string, tag: string): Promise<DomainTagsItem>;
|
|
202
|
-
update(domain: string, tag: string, description: string): Promise<DomainTagsMessageRes>;
|
|
203
|
-
destroy(domain: string, tag: string): Promise<DomainTagsMessageRes>;
|
|
204
|
-
statistic(domain: string, tag: string, query: DomainTagsStatisticQuery): Promise<DomainTagStatistic>;
|
|
205
|
-
countries(domain: string, tag: string): Promise<DomainTagCountriesAggregation>;
|
|
206
|
-
providers(domain: string, tag: string): Promise<DomainTagProvidersAggregation>;
|
|
207
|
-
devices(domain: string, tag: string): Promise<DomainTagDevicesAggregation>;
|
|
208
|
-
}
|
|
185
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { YesNo } from '../../Enums';
|
|
2
|
+
import { IDomainTemplate } from '../../Interfaces/Domains';
|
|
3
|
+
import { PagesList, ParsedPagesList } from '../Common';
|
|
4
|
+
export type DomainTemplateData = {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
template: string;
|
|
8
|
+
tag?: string;
|
|
9
|
+
engine?: string;
|
|
10
|
+
comment?: string;
|
|
11
|
+
};
|
|
12
|
+
export type DomainTemplateVersionData = {
|
|
13
|
+
template: string;
|
|
14
|
+
tag: string;
|
|
15
|
+
engine?: string;
|
|
16
|
+
comment?: string;
|
|
17
|
+
active?: YesNo;
|
|
18
|
+
};
|
|
19
|
+
export type DomainTemplateUpdateData = {
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
export type DomainTemplateUpdateVersionData = {
|
|
23
|
+
template?: string;
|
|
24
|
+
comment?: string;
|
|
25
|
+
active?: YesNo;
|
|
26
|
+
};
|
|
27
|
+
export type DomainTemplatesQuery = {
|
|
28
|
+
/** 'page' (optionally 'p') params from previous response's 'paging' object.
|
|
29
|
+
* Value must be stringified as query params. Ex: '?page=first','?page=next&p=name-of-last-item'
|
|
30
|
+
.... */
|
|
31
|
+
page?: `?${string}`;
|
|
32
|
+
/** Number of records to retrieve. Default value is 10. */
|
|
33
|
+
limit?: number;
|
|
34
|
+
};
|
|
35
|
+
export type TemplateQuery = {
|
|
36
|
+
active: YesNo;
|
|
37
|
+
};
|
|
38
|
+
export type ShortTemplateVersion = {
|
|
39
|
+
tag: string;
|
|
40
|
+
engine: string;
|
|
41
|
+
mjml: string;
|
|
42
|
+
createdAt: string | Date;
|
|
43
|
+
comment: string;
|
|
44
|
+
active: boolean;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
export type TemplateVersion = ShortTemplateVersion & {
|
|
48
|
+
template: string;
|
|
49
|
+
};
|
|
50
|
+
export type CreateDomainTemplateAPIResponse = {
|
|
51
|
+
status: number;
|
|
52
|
+
body: {
|
|
53
|
+
message: string;
|
|
54
|
+
template: IDomainTemplate;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type ListDomainTemplatesAPIResponse = {
|
|
58
|
+
status: number;
|
|
59
|
+
body: {
|
|
60
|
+
items: IDomainTemplate[];
|
|
61
|
+
paging: {
|
|
62
|
+
first: string;
|
|
63
|
+
last: string;
|
|
64
|
+
next: string;
|
|
65
|
+
previous: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export type ListDomainTemplatesResult = {
|
|
70
|
+
items: IDomainTemplate[];
|
|
71
|
+
pages: ParsedPagesList;
|
|
72
|
+
status: number;
|
|
73
|
+
};
|
|
74
|
+
export type GetDomainTemplateAPIResponse = {
|
|
75
|
+
status: number;
|
|
76
|
+
body: {
|
|
77
|
+
template: IDomainTemplate;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type UpdateOrDeleteDomainTemplateAPIResponse = {
|
|
81
|
+
status: number;
|
|
82
|
+
body: {
|
|
83
|
+
message: string;
|
|
84
|
+
template: {
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type UpdateOrDeleteDomainTemplateResult = {
|
|
90
|
+
status: number;
|
|
91
|
+
message: string;
|
|
92
|
+
templateName?: string;
|
|
93
|
+
};
|
|
94
|
+
export type NotificationAPIResponse = {
|
|
95
|
+
status: number;
|
|
96
|
+
body: {
|
|
97
|
+
message: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export type NotificationResult = {
|
|
101
|
+
status: number;
|
|
102
|
+
message: string;
|
|
103
|
+
};
|
|
104
|
+
export type CreateDomainTemplateVersionAPIResponse = {
|
|
105
|
+
status: number;
|
|
106
|
+
body: {
|
|
107
|
+
message: string;
|
|
108
|
+
template: IDomainTemplate;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export type CreateDomainTemplateVersionResult = {
|
|
112
|
+
status: number;
|
|
113
|
+
message: string;
|
|
114
|
+
template: IDomainTemplate;
|
|
115
|
+
};
|
|
116
|
+
export type MutateDomainTemplateVersionAPIResponse = {
|
|
117
|
+
status: number;
|
|
118
|
+
body: {
|
|
119
|
+
message: string;
|
|
120
|
+
template: {
|
|
121
|
+
name: string;
|
|
122
|
+
version: {
|
|
123
|
+
tag: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export type MutateDomainTemplateVersionResult = {
|
|
129
|
+
status: number;
|
|
130
|
+
message: string;
|
|
131
|
+
templateName: string;
|
|
132
|
+
templateVersion: {
|
|
133
|
+
tag: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export type ListDomainTemplateVersionsAPIResponse = {
|
|
137
|
+
status: number;
|
|
138
|
+
body: {
|
|
139
|
+
template: {
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
createdAt: string;
|
|
143
|
+
createdBy: string;
|
|
144
|
+
id: string;
|
|
145
|
+
versions: ShortTemplateVersion[];
|
|
146
|
+
};
|
|
147
|
+
paging: PagesList;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
export type ListDomainTemplateVersionsResult = {
|
|
151
|
+
template: IDomainTemplate;
|
|
152
|
+
pages: ParsedPagesList;
|
|
153
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type DomainTrackingData = {
|
|
2
2
|
click: {
|
|
3
3
|
active: boolean;
|
|
4
4
|
};
|
|
@@ -10,14 +10,14 @@ export interface DomainTrackingData {
|
|
|
10
10
|
html_footer: string;
|
|
11
11
|
text_footer: string;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
};
|
|
14
|
+
export type DomainTrackingResponse = {
|
|
15
15
|
status: number;
|
|
16
16
|
body: {
|
|
17
17
|
tracking: DomainTrackingData;
|
|
18
18
|
};
|
|
19
|
-
}
|
|
20
|
-
export
|
|
19
|
+
};
|
|
20
|
+
export type UpdatedOpenTracking = {
|
|
21
21
|
message: string;
|
|
22
22
|
open?: {
|
|
23
23
|
active: boolean;
|
|
@@ -30,11 +30,11 @@ export interface UpdatedOpenTracking {
|
|
|
30
30
|
html_footer: string;
|
|
31
31
|
text_footer: string;
|
|
32
32
|
};
|
|
33
|
-
}
|
|
34
|
-
export
|
|
33
|
+
};
|
|
34
|
+
export type UpdateDomainTrackingResponse = {
|
|
35
35
|
status: number;
|
|
36
36
|
body: UpdatedOpenTracking;
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
export type OpenTrackingInfo = {
|
|
39
39
|
active: 'yes' | 'no' | 'true' | 'false';
|
|
40
40
|
};
|
|
@@ -4,7 +4,7 @@ export type DomainsQuery = {
|
|
|
4
4
|
limit?: number;
|
|
5
5
|
skip?: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type DomainInfo = {
|
|
8
8
|
name: string;
|
|
9
9
|
smtp_password: string;
|
|
10
10
|
spam_action?: 'disabled' | 'block' | 'tag';
|
|
@@ -14,8 +14,8 @@ export interface DomainInfo {
|
|
|
14
14
|
ips?: '';
|
|
15
15
|
pool_id?: '';
|
|
16
16
|
web_scheme: 'http' | 'https';
|
|
17
|
-
}
|
|
18
|
-
export
|
|
17
|
+
};
|
|
18
|
+
export type DomainShortData = {
|
|
19
19
|
name: string;
|
|
20
20
|
require_tls: boolean;
|
|
21
21
|
skip_verification: boolean;
|
|
@@ -26,13 +26,13 @@ export interface DomainShortData {
|
|
|
26
26
|
smtp_password: string;
|
|
27
27
|
smtp_login: string;
|
|
28
28
|
type: string;
|
|
29
|
-
}
|
|
30
|
-
export
|
|
29
|
+
};
|
|
30
|
+
export type DomainData = DomainShortData & {
|
|
31
31
|
id: string;
|
|
32
32
|
is_disabled: boolean;
|
|
33
33
|
web_prefix: string;
|
|
34
34
|
web_scheme: string;
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
export interface DomainsListItem extends DomainShortData {
|
|
37
37
|
receiving_dns_records: null;
|
|
38
38
|
sending_dns_records: null;
|
|
@@ -53,69 +53,83 @@ export type DomainResponseData = {
|
|
|
53
53
|
sending_dns_records: DNSRecord[];
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type DomainListResponseData = {
|
|
57
57
|
status: number;
|
|
58
58
|
body: {
|
|
59
59
|
items: DomainsListItem[] | null;
|
|
60
60
|
total_count: number;
|
|
61
61
|
};
|
|
62
|
-
}
|
|
63
|
-
export
|
|
62
|
+
};
|
|
63
|
+
export type MessageResponse = {
|
|
64
64
|
message: string;
|
|
65
|
-
}
|
|
66
|
-
export
|
|
65
|
+
};
|
|
66
|
+
export type DestroyedDomainResponse = {
|
|
67
67
|
status: number;
|
|
68
68
|
body: MessageResponse;
|
|
69
|
-
}
|
|
69
|
+
};
|
|
70
70
|
export type ConnectionSettings = {
|
|
71
71
|
require_tls: boolean;
|
|
72
72
|
skip_verification: boolean;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type ConnectionSettingsResponse = {
|
|
75
75
|
body: {
|
|
76
76
|
connection: ConnectionSettings;
|
|
77
77
|
};
|
|
78
78
|
status: number;
|
|
79
|
-
}
|
|
80
|
-
export
|
|
79
|
+
};
|
|
80
|
+
export type UpdatedConnectionSettings = {
|
|
81
81
|
message: string;
|
|
82
82
|
require_tls: boolean;
|
|
83
83
|
skip_verification: boolean;
|
|
84
|
-
}
|
|
85
|
-
export
|
|
84
|
+
};
|
|
85
|
+
export type UpdatedConnectionSettingsRes = {
|
|
86
86
|
body: UpdatedConnectionSettings;
|
|
87
87
|
status: number;
|
|
88
|
-
}
|
|
89
|
-
export
|
|
88
|
+
};
|
|
89
|
+
export type DKIMAuthorityInfo = {
|
|
90
90
|
self: boolean | 'yes' | 'no' | 'true' | 'false';
|
|
91
|
-
}
|
|
92
|
-
export
|
|
91
|
+
};
|
|
92
|
+
export type UpdatedDKIMAuthority = {
|
|
93
93
|
changed: boolean;
|
|
94
94
|
message: string;
|
|
95
95
|
sending_dns_records: DNSRecord[];
|
|
96
|
-
}
|
|
97
|
-
export
|
|
96
|
+
};
|
|
97
|
+
export type UpdatedDKIMAuthorityResponse = {
|
|
98
98
|
body: UpdatedDKIMAuthority;
|
|
99
99
|
status: 200;
|
|
100
|
-
}
|
|
101
|
-
export
|
|
100
|
+
};
|
|
101
|
+
export type DKIMSelectorInfo = {
|
|
102
102
|
dkimSelector: string;
|
|
103
|
-
}
|
|
104
|
-
export
|
|
103
|
+
};
|
|
104
|
+
export type UpdatedDKIMSelectorResponse = {
|
|
105
105
|
body: MessageResponse;
|
|
106
106
|
status: number;
|
|
107
|
-
}
|
|
108
|
-
export
|
|
107
|
+
};
|
|
108
|
+
export type WebPrefixInfo = {
|
|
109
109
|
webPrefix: string;
|
|
110
|
-
}
|
|
111
|
-
export
|
|
110
|
+
};
|
|
111
|
+
export type UpdatedWebPrefix = {
|
|
112
112
|
message: string;
|
|
113
|
-
}
|
|
114
|
-
export
|
|
113
|
+
};
|
|
114
|
+
export type UpdatedWebPrefixResponse = {
|
|
115
115
|
body: MessageResponse;
|
|
116
116
|
status: number;
|
|
117
|
-
}
|
|
118
|
-
export
|
|
117
|
+
};
|
|
118
|
+
export type ReplacementForPool = {
|
|
119
119
|
pool_id?: string;
|
|
120
120
|
ip?: string;
|
|
121
|
-
}
|
|
121
|
+
};
|
|
122
|
+
export type TDomain = {
|
|
123
|
+
name: string;
|
|
124
|
+
require_tls: boolean;
|
|
125
|
+
skip_verification: boolean;
|
|
126
|
+
state: string;
|
|
127
|
+
wildcard: boolean;
|
|
128
|
+
spam_action: string;
|
|
129
|
+
created_at: string;
|
|
130
|
+
smtp_password: string;
|
|
131
|
+
smtp_login: string;
|
|
132
|
+
type: string;
|
|
133
|
+
receiving_dns_records: DNSRecord[] | null;
|
|
134
|
+
sending_dns_records: DNSRecord[] | null;
|
|
135
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PagesList, ParsedPagesList } from '
|
|
2
|
-
export
|
|
1
|
+
import { PagesList, ParsedPagesList } from '../Common';
|
|
2
|
+
export type EventsPage = {
|
|
3
3
|
id: string;
|
|
4
4
|
number: string;
|
|
5
5
|
url: string;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
};
|
|
7
|
+
export type FilterField = {
|
|
8
8
|
event?: string;
|
|
9
9
|
list?: string;
|
|
10
10
|
attachment?: string;
|
|
@@ -17,22 +17,22 @@ export interface FilterField {
|
|
|
17
17
|
recipients?: string;
|
|
18
18
|
tags?: string;
|
|
19
19
|
severity?: string;
|
|
20
|
-
}
|
|
21
|
-
export
|
|
20
|
+
};
|
|
21
|
+
export type EventsQuery = FilterField & {
|
|
22
22
|
page?: string;
|
|
23
23
|
begin?: string;
|
|
24
24
|
end?: string;
|
|
25
25
|
ascending?: 'yes' | 'no';
|
|
26
26
|
limit?: number;
|
|
27
|
-
}
|
|
28
|
-
export
|
|
27
|
+
};
|
|
28
|
+
export type EventsResponse = {
|
|
29
29
|
body: {
|
|
30
30
|
items: [];
|
|
31
31
|
paging: PagesList;
|
|
32
32
|
};
|
|
33
33
|
status: number;
|
|
34
|
-
}
|
|
35
|
-
export
|
|
34
|
+
};
|
|
35
|
+
export type DomainEvent = {
|
|
36
36
|
severity: string;
|
|
37
37
|
tags: string[];
|
|
38
38
|
storage: {
|
|
@@ -55,7 +55,7 @@ export interface DomainEvent {
|
|
|
55
55
|
campaigns: [];
|
|
56
56
|
reason: string;
|
|
57
57
|
'user-variables': {
|
|
58
|
-
[key: string]:
|
|
58
|
+
[key: string]: unknown;
|
|
59
59
|
};
|
|
60
60
|
flags: {
|
|
61
61
|
'is-routed': boolean;
|
|
@@ -64,7 +64,7 @@ export interface DomainEvent {
|
|
|
64
64
|
'is-test-mode': boolean;
|
|
65
65
|
};
|
|
66
66
|
'log-level': string;
|
|
67
|
-
template?:
|
|
67
|
+
template?: unknown;
|
|
68
68
|
timestamp: number;
|
|
69
69
|
envelope: {
|
|
70
70
|
transport: string;
|
|
@@ -84,9 +84,9 @@ export interface DomainEvent {
|
|
|
84
84
|
};
|
|
85
85
|
recipient: string;
|
|
86
86
|
event: string;
|
|
87
|
-
}
|
|
88
|
-
export
|
|
87
|
+
};
|
|
88
|
+
export type EventsList = {
|
|
89
89
|
items: DomainEvent[];
|
|
90
90
|
pages: ParsedPagesList;
|
|
91
91
|
status: number;
|
|
92
|
-
}
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Events';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IpPool = {
|
|
2
2
|
description: string;
|
|
3
3
|
ips: string[];
|
|
4
4
|
is_linked: boolean;
|
|
5
5
|
name: string;
|
|
6
6
|
pool_id: string;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export type IpPoolListResponse = {
|
|
9
9
|
body: {
|
|
10
10
|
ip_pools: IpPool;
|
|
11
11
|
message: string;
|
|
12
12
|
};
|
|
13
13
|
status: number;
|
|
14
|
-
}
|
|
15
|
-
export
|
|
14
|
+
};
|
|
15
|
+
export type IpPoolListResult = {
|
|
16
16
|
ip_pools: IpPool;
|
|
17
17
|
message: string;
|
|
18
18
|
status: number;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
export type IpPoolUpdateData = {
|
|
21
21
|
name: string;
|
|
22
22
|
description: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IpPools';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IpsListResponseBody = {
|
|
2
2
|
assignable_to_pools: boolean;
|
|
3
3
|
items: string[];
|
|
4
4
|
total_count: number;
|
|
5
|
-
}
|
|
6
|
-
export
|
|
5
|
+
};
|
|
6
|
+
export type IpData = {
|
|
7
7
|
ip: string;
|
|
8
8
|
dedicated: boolean;
|
|
9
9
|
rdns: string;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export type IPsListQuery = {
|
|
12
|
+
dedicated: boolean | string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IPs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MailgunClientOptions';
|