mailgun.js 8.2.1 → 9.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/Classes/Domains/domain.d.ts +16 -0
  3. package/{domains.d.ts → Classes/Domains/domains.d.ts} +5 -8
  4. package/Classes/Domains/domainsClient.d.ts +36 -0
  5. package/{domainsCredentials.d.ts → Classes/Domains/domainsCredentials.d.ts} +3 -2
  6. package/{domainsTags.d.ts → Classes/Domains/domainsTags.d.ts} +6 -4
  7. package/{domainsTemplates.d.ts → Classes/Domains/domainsTemplates.d.ts} +9 -8
  8. package/{events.d.ts → Classes/Events.d.ts} +4 -3
  9. package/{ip-pools.d.ts → Classes/IPPools.d.ts} +4 -3
  10. package/Classes/IPs.d.ts +10 -0
  11. package/Classes/MailgunClient.d.ts +18 -0
  12. package/{mailListMembers.d.ts → Classes/MailingLists/mailListMembers.d.ts} +4 -3
  13. package/Classes/MailingLists/mailingLists.d.ts +21 -0
  14. package/{messages.d.ts → Classes/Messages.d.ts} +4 -3
  15. package/{routes.d.ts → Classes/Routes.d.ts} +4 -3
  16. package/Classes/Stats/StatsClient.d.ts +14 -0
  17. package/Classes/Stats/StatsContainer.d.ts +9 -0
  18. package/Classes/Suppressions/Bounce.d.ts +10 -0
  19. package/Classes/Suppressions/Complaint.d.ts +8 -0
  20. package/Classes/Suppressions/Suppression.d.ts +5 -0
  21. package/Classes/Suppressions/SuppressionsClient.d.ts +23 -0
  22. package/Classes/Suppressions/Unsubscribe.d.ts +9 -0
  23. package/Classes/Suppressions/WhiteList.d.ts +9 -0
  24. package/{multipleValidation.d.ts → Classes/Validations/multipleValidation.d.ts} +4 -3
  25. package/Classes/Validations/validate.d.ts +9 -0
  26. package/Classes/Webhooks.d.ts +21 -0
  27. package/Classes/common/Error.d.ts +8 -0
  28. package/{formDataBuilder.d.ts → Classes/common/FormDataBuilder.d.ts} +1 -1
  29. package/Classes/common/NavigationThruPages.d.ts +17 -0
  30. package/{request.d.ts → Classes/common/Request.d.ts} +2 -4
  31. package/Enums/index.d.ts +24 -0
  32. package/Interfaces/Common/Logger.d.ts +3 -0
  33. package/Interfaces/Common/index.d.ts +1 -0
  34. package/Interfaces/Domains/DomainCredentials.d.ts +7 -0
  35. package/Interfaces/Domains/DomainTags.d.ts +20 -0
  36. package/Interfaces/Domains/DomainTemplates.d.ts +23 -0
  37. package/Interfaces/Domains/DomainsClient.d.ts +21 -0
  38. package/Interfaces/Domains/index.d.ts +4 -0
  39. package/Interfaces/EventClient/IEventClient.d.ts +4 -0
  40. package/Interfaces/EventClient/index.d.ts +1 -0
  41. package/Interfaces/IPPools/IIPPoolsClient.d.ts +7 -0
  42. package/Interfaces/IPPools/index.d.ts +1 -0
  43. package/Interfaces/IPs/IIPsClient.d.ts +5 -0
  44. package/Interfaces/IPs/index.d.ts +1 -0
  45. package/Interfaces/MailgunClient/IMailgunClient.d.ts +24 -0
  46. package/Interfaces/MailgunClient/index.d.ts +1 -0
  47. package/Interfaces/MailingLists/MailingListMembers.d.ts +9 -0
  48. package/Interfaces/MailingLists/MailingListsClient.d.ts +11 -0
  49. package/Interfaces/MailingLists/index.d.ts +2 -0
  50. package/Interfaces/Messages/IMessagesClient.d.ts +4 -0
  51. package/Interfaces/Messages/index.d.ts +1 -0
  52. package/Interfaces/Routes/IRoutesClient.d.ts +8 -0
  53. package/Interfaces/Routes/index.d.ts +1 -0
  54. package/Interfaces/Stats/StatsClient.d.ts +6 -0
  55. package/Interfaces/Stats/StatsContainer.d.ts +7 -0
  56. package/Interfaces/Stats/index.d.ts +2 -0
  57. package/{interfaces → Interfaces}/Suppressions/Bounce.d.ts +0 -6
  58. package/{interfaces → Interfaces}/Suppressions/Complaint.d.ts +0 -4
  59. package/Interfaces/Suppressions/ISuppressionsClient.d.ts +11 -0
  60. package/{interfaces → Interfaces}/Suppressions/Unsubscribe.d.ts +0 -5
  61. package/Interfaces/Suppressions/WhiteList.d.ts +6 -0
  62. package/Interfaces/Suppressions/index.d.ts +5 -0
  63. package/Interfaces/Validations/MultipleValidation.d.ts +7 -0
  64. package/Interfaces/Validations/Validation.d.ts +4 -0
  65. package/Interfaces/Validations/index.d.ts +2 -0
  66. package/Interfaces/Webhooks/IWebHooksClient.d.ts +9 -0
  67. package/Interfaces/Webhooks/index.d.ts +1 -0
  68. package/Interfaces/index.d.ts +13 -0
  69. package/README.md +42 -13
  70. package/Types/Common/ApiResponse.d.ts +4 -0
  71. package/Types/Common/Error.d.ts +19 -0
  72. package/Types/Common/FormData.d.ts +7 -0
  73. package/{interfaces → Types/Common}/NavigationThruPages.d.ts +14 -14
  74. package/{interfaces → Types/Common}/RequestOptions.d.ts +7 -7
  75. package/Types/Common/index.d.ts +5 -0
  76. package/Types/Domains/DomainCredentials.d.ts +46 -0
  77. package/{interfaces → Types/Domains}/DomainTags.d.ts +36 -59
  78. package/Types/Domains/DomainTemplates.d.ts +153 -0
  79. package/{interfaces → Types/Domains}/DomainTracking.d.ts +11 -11
  80. package/{interfaces → Types/Domains}/Domains.d.ts +53 -39
  81. package/Types/Domains/index.d.ts +5 -0
  82. package/{interfaces → Types/Events}/Events.d.ts +15 -15
  83. package/Types/Events/index.d.ts +1 -0
  84. package/{interfaces → Types/IPPools}/IpPools.d.ts +13 -13
  85. package/Types/IPPools/index.d.ts +1 -0
  86. package/{interfaces/Ips.d.ts → Types/IPs/IPs.d.ts} +7 -4
  87. package/Types/IPs/index.d.ts +1 -0
  88. package/{interfaces/Options.d.ts → Types/MailgunClient/MailgunClientOptions.d.ts} +2 -3
  89. package/Types/MailgunClient/index.d.ts +1 -0
  90. package/Types/MailingLists/MailingListMembers.d.ts +60 -0
  91. package/{interfaces/lists.d.ts → Types/MailingLists/MailingLists.d.ts} +24 -24
  92. package/Types/MailingLists/index.d.ts +2 -0
  93. package/{interfaces → Types/Messages}/Messages.d.ts +8 -8
  94. package/Types/Messages/index.d.ts +1 -0
  95. package/{interfaces/routes.d.ts → Types/Routes/Routes.d.ts} +8 -8
  96. package/Types/Routes/index.d.ts +1 -0
  97. package/{interfaces/StatsOptions.d.ts → Types/Stats/Stats.d.ts} +7 -7
  98. package/Types/Stats/index.d.ts +1 -0
  99. package/Types/Suppressions/Bounce.d.ts +6 -0
  100. package/Types/Suppressions/Complaint.d.ts +4 -0
  101. package/Types/Suppressions/Suppressions.d.ts +60 -0
  102. package/Types/Suppressions/Unsubscribe.d.ts +5 -0
  103. package/Types/Suppressions/WhiteList.d.ts +6 -0
  104. package/Types/Suppressions/index.d.ts +5 -0
  105. package/{interfaces → Types/Validations}/MultipleValidation.d.ts +19 -25
  106. package/{interfaces/Validate.d.ts → Types/Validations/Validation.d.ts} +5 -5
  107. package/Types/Validations/index.d.ts +2 -0
  108. package/Types/Webhooks/Webhooks.d.ts +29 -0
  109. package/Types/Webhooks/index.d.ts +1 -0
  110. package/Types/index.d.ts +13 -0
  111. package/index.d.ts +7 -4
  112. package/mailgun.node.js +2 -2
  113. package/mailgun.node.js.LICENSE.txt +1 -1
  114. package/mailgun.web.js +2 -2
  115. package/mailgun.web.js.LICENSE.txt +1 -1
  116. package/package.json +1 -1
  117. package/version.md +1 -1
  118. package/client.d.ts +0 -29
  119. package/common/NavigationThruPages.d.ts +0 -19
  120. package/error.d.ts +0 -8
  121. package/interfaces/APIErrorOptions.d.ts +0 -11
  122. package/interfaces/ApiResponse.d.ts +0 -5
  123. package/interfaces/DomainCredentials.d.ts +0 -52
  124. package/interfaces/DomainTemplates.d.ts +0 -178
  125. package/interfaces/IFormData.d.ts +0 -7
  126. package/interfaces/IMailgunClient.d.ts +0 -24
  127. package/interfaces/Suppressions/Suppressions.d.ts +0 -69
  128. package/interfaces/Suppressions/WhiteList.d.ts +0 -12
  129. package/interfaces/Supressions.d.ts +0 -103
  130. package/interfaces/Webhooks.d.ts +0 -34
  131. package/interfaces/mailListMembers.d.ts +0 -68
  132. package/ips.d.ts +0 -9
  133. package/lists.d.ts +0 -20
  134. package/stats.d.ts +0 -20
  135. package/suppressions.d.ts +0 -53
  136. package/validate.d.ts +0 -9
  137. package/webhooks.d.ts +0 -32
@@ -1,50 +1,45 @@
1
- import { DomainTagStatistic } from '../domainsTags';
2
- import { PagesList, ParsedPagesList } from './NavigationThruPages';
3
- export declare enum Resolution {
4
- HOUR = "hour",
5
- DAY = "day",
6
- MONTH = "month"
7
- }
8
- export declare type DomainTagsQuery = {
1
+ import { Resolution } from '../../Enums';
2
+ import { PagesList, ParsedPagesList } from '../Common';
3
+ export type DomainTagsQuery = {
9
4
  limit: number;
10
5
  page?: string;
11
6
  };
12
- export declare type DomainTagsStatisticQuery = {
7
+ export type DomainTagsStatisticQuery = {
13
8
  event: string;
14
9
  start?: number;
15
10
  end?: number;
16
11
  resolution?: Resolution;
17
12
  duration?: string;
18
13
  };
19
- export interface DomainTagsItemInfo {
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 interface DomainTagsItem {
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 interface DomainTagsResponseData {
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 interface DomainTagsList {
32
+ };
33
+ export type DomainTagsList = {
39
34
  status: number;
40
35
  items: DomainTagsItem[];
41
36
  pages: ParsedPagesList;
42
- }
43
- export interface DomainTagsMessageRes {
37
+ };
38
+ export type DomainTagsMessageRes = {
44
39
  message: string;
45
40
  status?: number;
46
- }
47
- export interface DomainTagAPIResponseStatsItem {
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 interface DomainTagStatAPIResponse {
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 interface DomainTagStatisticItem extends Omit<DomainTagAPIResponseStatsItem, 'time'> {
96
+ };
97
+ export type DomainTagStatisticItem = Omit<DomainTagAPIResponseStatsItem, 'time'> & {
103
98
  time: Date;
104
- }
105
- export interface DomainTagStatisticResult {
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 interface DomainTagCountriesAggregation {
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 interface DomainTagProvidersAPIResponse {
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 interface DomainTagProvidersAggregation {
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 interface DeviceStatistic {
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 interface DevicesTypes {
168
+ };
169
+ export type DevicesTypes = {
183
170
  desktop: DeviceStatistic;
184
171
  mobile: DeviceStatistic;
185
172
  tablet: DeviceStatistic;
186
173
  unknown: DeviceStatistic;
187
- }
188
- export interface DomainTagDevicesAPIResponse {
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 interface DomainTagDevicesAggregation {
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 interface DomainTrackingData {
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 interface DomainTrackingResponse {
13
+ };
14
+ export type DomainTrackingResponse = {
15
15
  status: number;
16
16
  body: {
17
17
  tracking: DomainTrackingData;
18
18
  };
19
- }
20
- export interface UpdatedOpenTracking {
19
+ };
20
+ export type UpdatedOpenTracking = {
21
21
  message: string;
22
22
  open?: {
23
23
  active: boolean;
@@ -30,18 +30,18 @@ export interface UpdatedOpenTracking {
30
30
  html_footer: string;
31
31
  text_footer: string;
32
32
  };
33
- }
34
- export interface UpdateDomainTrackingResponse {
33
+ };
34
+ export type UpdateDomainTrackingResponse = {
35
35
  status: number;
36
36
  body: UpdatedOpenTracking;
37
- }
38
- export declare type OpenTrackingInfo = {
37
+ };
38
+ export type OpenTrackingInfo = {
39
39
  active: 'yes' | 'no' | 'true' | 'false';
40
40
  };
41
- export declare type ClickTrackingInfo = {
41
+ export type ClickTrackingInfo = {
42
42
  active: 'yes' | 'no' | 'true' | 'false' | 'htmlonly';
43
43
  };
44
- export declare type UnsubscribeTrackingInfo = {
44
+ export type UnsubscribeTrackingInfo = {
45
45
  active: 'yes' | 'no' | 'true' | 'false';
46
46
  html_footer: string;
47
47
  text_footer: string;
@@ -1,10 +1,10 @@
1
- export declare type DomainsQuery = {
1
+ export type DomainsQuery = {
2
2
  authority?: string;
3
3
  state?: 'active' | 'unverified' | 'disabled';
4
4
  limit?: number;
5
5
  skip?: number;
6
6
  };
7
- export interface DomainInfo {
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 interface DomainShortData {
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 interface DomainData extends DomainShortData {
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;
@@ -44,7 +44,7 @@ export interface DNSRecord {
44
44
  valid: string;
45
45
  value: string;
46
46
  }
47
- export declare type DomainResponseData = {
47
+ export type DomainResponseData = {
48
48
  status: number;
49
49
  body: {
50
50
  domain: DomainData;
@@ -53,69 +53,83 @@ export declare type DomainResponseData = {
53
53
  sending_dns_records: DNSRecord[];
54
54
  };
55
55
  };
56
- export interface DomainListResponseData {
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 interface MessageResponse {
62
+ };
63
+ export type MessageResponse = {
64
64
  message: string;
65
- }
66
- export interface DestroyedDomainResponse {
65
+ };
66
+ export type DestroyedDomainResponse = {
67
67
  status: number;
68
68
  body: MessageResponse;
69
- }
70
- export declare type ConnectionSettings = {
69
+ };
70
+ export type ConnectionSettings = {
71
71
  require_tls: boolean;
72
72
  skip_verification: boolean;
73
73
  };
74
- export interface ConnectionSettingsResponse {
74
+ export type ConnectionSettingsResponse = {
75
75
  body: {
76
76
  connection: ConnectionSettings;
77
77
  };
78
78
  status: number;
79
- }
80
- export interface UpdatedConnectionSettings {
79
+ };
80
+ export type UpdatedConnectionSettings = {
81
81
  message: string;
82
82
  require_tls: boolean;
83
83
  skip_verification: boolean;
84
- }
85
- export interface UpdatedConnectionSettingsRes {
84
+ };
85
+ export type UpdatedConnectionSettingsRes = {
86
86
  body: UpdatedConnectionSettings;
87
87
  status: number;
88
- }
89
- export interface DKIMAuthorityInfo {
88
+ };
89
+ export type DKIMAuthorityInfo = {
90
90
  self: boolean | 'yes' | 'no' | 'true' | 'false';
91
- }
92
- export interface UpdatedDKIMAuthority {
91
+ };
92
+ export type UpdatedDKIMAuthority = {
93
93
  changed: boolean;
94
94
  message: string;
95
95
  sending_dns_records: DNSRecord[];
96
- }
97
- export interface UpdatedDKIMAuthorityResponse {
96
+ };
97
+ export type UpdatedDKIMAuthorityResponse = {
98
98
  body: UpdatedDKIMAuthority;
99
99
  status: 200;
100
- }
101
- export interface DKIMSelectorInfo {
100
+ };
101
+ export type DKIMSelectorInfo = {
102
102
  dkimSelector: string;
103
- }
104
- export interface UpdatedDKIMSelectorResponse {
103
+ };
104
+ export type UpdatedDKIMSelectorResponse = {
105
105
  body: MessageResponse;
106
106
  status: number;
107
- }
108
- export interface WebPrefixInfo {
107
+ };
108
+ export type WebPrefixInfo = {
109
109
  webPrefix: string;
110
- }
111
- export interface UpdatedWebPrefix {
110
+ };
111
+ export type UpdatedWebPrefix = {
112
112
  message: string;
113
- }
114
- export interface UpdatedWebPrefixResponse {
113
+ };
114
+ export type UpdatedWebPrefixResponse = {
115
115
  body: MessageResponse;
116
116
  status: number;
117
- }
118
- export interface ReplacementForPool {
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
+ };
@@ -0,0 +1,5 @@
1
+ export * from './DomainCredentials';
2
+ export * from './Domains';
3
+ export * from './DomainTags';
4
+ export * from './DomainTemplates';
5
+ export * from './DomainTracking';
@@ -1,10 +1,10 @@
1
- import { PagesList, ParsedPagesList } from './NavigationThruPages';
2
- export interface EventsPage {
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 interface FilterField {
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 interface EventsQuery extends FilterField {
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 interface EventsResponse {
27
+ };
28
+ export type EventsResponse = {
29
29
  body: {
30
30
  items: [];
31
31
  paging: PagesList;
32
32
  };
33
33
  status: number;
34
- }
35
- export interface DomainEvent {
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]: any;
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?: any;
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 interface EventsList {
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,54 +1,54 @@
1
- export interface IpPool {
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 interface IpPoolListResponse {
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 interface IpPoolListResult {
14
+ };
15
+ export type IpPoolListResult = {
16
16
  ip_pools: IpPool;
17
17
  message: string;
18
18
  status: number;
19
- }
20
- export declare type IpPoolUpdateData = {
19
+ };
20
+ export type IpPoolUpdateData = {
21
21
  name: string;
22
22
  description: string;
23
23
  ips: string[];
24
24
  };
25
- export declare type IpPoolMessageResponse = {
25
+ export type IpPoolMessageResponse = {
26
26
  body: {
27
27
  message: string;
28
28
  };
29
29
  status: number;
30
30
  };
31
- export declare type IpPoolMessageResult = {
31
+ export type IpPoolMessageResult = {
32
32
  message: string;
33
33
  status: number;
34
34
  };
35
- export declare type IpPoolDeleteData = {
35
+ export type IpPoolDeleteData = {
36
36
  ip?: string;
37
37
  pool_id?: string;
38
38
  };
39
- export declare type IpPoolCreateData = {
39
+ export type IpPoolCreateData = {
40
40
  name: string;
41
41
  description?: string;
42
42
  ips?: string[];
43
43
  };
44
- export declare type IpPoolCreateResponse = {
44
+ export type IpPoolCreateResponse = {
45
45
  body: {
46
46
  message: string;
47
47
  pool_id: string;
48
48
  };
49
49
  status: number;
50
50
  };
51
- export declare type IpPoolCreateResult = {
51
+ export type IpPoolCreateResult = {
52
52
  status: number;
53
53
  message: string;
54
54
  pool_id: string;
@@ -0,0 +1 @@
1
+ export * from './IpPools';