mailgun.js 12.3.1 → 12.4.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/README.md CHANGED
@@ -259,6 +259,8 @@ The following service methods are available to instantiated clients. The example
259
259
  - [events](#events)
260
260
  - [get](#get-3)
261
261
  - [Example with Date and *Filter field*](#example-with-date-and-filter-field)
262
+ - [logs](#logs)
263
+ - [list](#list-3)
262
264
  - [stats](#stats)
263
265
  - [Stats Options](#stats-options)
264
266
  - [getDomain](#getdomain)
@@ -267,7 +269,7 @@ The following service methods are available to instantiated clients. The example
267
269
  - [getAccount](#getaccount-1)
268
270
  - [getAccountUsage](#getaccountusage)
269
271
  - [suppressions](#suppressions)
270
- - [list](#list-3)
272
+ - [list](#list-4)
271
273
  - [Bounces Example](#bounces-example)
272
274
  - [Unsubscribes Example](#unsubscribes-example)
273
275
  - [Complaints Example](#complaints-example)
@@ -286,13 +288,13 @@ The following service methods are available to instantiated clients. The example
286
288
  - [Unsubscribes Example](#unsubscribes-example-3)
287
289
  - [Complaints Example](#complaints-example-3)
288
290
  - [webhooks](#webhooks)
289
- - [list](#list-4)
291
+ - [list](#list-5)
290
292
  - [get](#get-5)
291
293
  - [create](#create-5)
292
294
  - [update](#update-2)
293
295
  - [destroy](#destroy-4)
294
296
  - [routes](#routes)
295
- - [list](#list-5)
297
+ - [list](#list-6)
296
298
  - [get](#get-6)
297
299
  - [create](#create-6)
298
300
  - [update](#update-3)
@@ -301,11 +303,11 @@ The following service methods are available to instantiated clients. The example
301
303
  - [get](#get-7)
302
304
  - [multiple validation](#multiple-validation)
303
305
  - [create](#create-7)
304
- - [list](#list-6)
306
+ - [list](#list-7)
305
307
  - [get](#get-8)
306
308
  - [destroy](#destroy-6)
307
309
  - [mailing lists](#mailing-lists)
308
- - [list](#list-7)
310
+ - [list](#list-8)
309
311
  - [get](#get-9)
310
312
  - [create](#create-8)
311
313
  - [update](#update-4)
@@ -318,7 +320,7 @@ The following service methods are available to instantiated clients. The example
318
320
  - [updateMember](#updatemember)
319
321
  - [destroyMember](#destroymember)
320
322
  - [subaccounts](#subaccounts)
321
- - [list](#list-8)
323
+ - [list](#list-9)
322
324
  - [get](#get-10)
323
325
  - [create](#create-9)
324
326
  - [enable](#enable)
@@ -329,28 +331,28 @@ The following service methods are available to instantiated clients. The example
329
331
  - [updateSubaccountFeature](#updatesubaccountfeature)
330
332
  - [inbox placements](#inbox-placements)
331
333
  - [SeedsLists](#seedslists)
332
- - [list](#list-9)
334
+ - [list](#list-10)
333
335
  - [get](#get-11)
334
336
  - [create](#create-10)
335
337
  - [update](#update-5)
336
338
  - [destroy](#destroy-9)
337
339
  - [SeedsLists Attributes](#attributes)
338
- - [list](#list-10)
340
+ - [list](#list-11)
339
341
  - [get](#get-12)
340
342
  - [SeedsLists Filters](#filters)
341
- - [list](#list-11)
343
+ - [list](#list-12)
342
344
  - [Providers](#providers)
343
- - [list](#list-12)
344
- - [Results](#results)
345
345
  - [list](#list-13)
346
+ - [Results](#results)
347
+ - [list](#list-14)
346
348
  - [get](#get-13)
347
349
  - [destroy](#destroy-10)
348
350
  - [getResultByShareId](#getresultbyshareid)
349
351
  - [Results Attributes](#attributes-1)
350
- - [list](#list-14)
352
+ - [list](#list-15)
351
353
  - [get](#get-14)
352
354
  - [Results Filters](#filters-1)
353
- - [list](#list-15)
355
+ - [list](#list-16)
354
356
  - [Sharing](#sharing)
355
357
  - [get](#get-15)
356
358
  - [update](#update-6)
@@ -2252,7 +2254,7 @@ The following service methods are available to instantiated clients. The example
2252
2254
  ### Events
2253
2255
 
2254
2256
  - #### get
2255
- ***Deprecated, and will be removed in the future releases***
2257
+ ***Deprecated, and will be removed in the future releases. Use [Logs](#logs) instead**
2256
2258
 
2257
2259
  [API Reference](https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/events)
2258
2260
 
@@ -2309,6 +2311,93 @@ The following service methods are available to instantiated clients. The example
2309
2311
  }
2310
2312
  ```
2311
2313
 
2314
+ ### Logs
2315
+ Mailgun keeps track of every inbound and outbound message event and stores this log data. This data can be queried and filtered to provide insights into the health of your email infrastructure.
2316
+
2317
+ - #### list
2318
+ Gets customer event logs for an account
2319
+
2320
+ [API Reference](https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/stats)
2321
+
2322
+ ```mg.logs.list(query)```
2323
+
2324
+ Example:
2325
+
2326
+ ```JS
2327
+ mg.logs.list({
2328
+ start: new Date('2025-11-17T13:00:00Z'), // required
2329
+ end: new Date('2025-11-30T13:05:00Z'), // required
2330
+ include_totals: true,
2331
+ events: ['accepted'], // opened, delivered, etc.
2332
+ include_subaccounts: false,
2333
+ pagination: {
2334
+ token: 'page token from response',
2335
+ limit: 5,
2336
+ sort: 'timestamp:asc'
2337
+ },
2338
+ filter: {
2339
+ AND: [
2340
+ {
2341
+ attribute: 'domain',
2342
+ comparator: '=',
2343
+ values: [
2344
+ {
2345
+ label: 'example.com',
2346
+ value: 'example.com'
2347
+ }
2348
+ ]
2349
+ }
2350
+ ]
2351
+ }
2352
+ }).then(data => console.log(data)) // logs response
2353
+ .catch(err => console.error(err)); // logs any error
2354
+ ```
2355
+
2356
+ Promise returns:
2357
+ ```JS
2358
+ {
2359
+ start: new Date('2025-11-17T13:00:00.000Z'),
2360
+ end: new Date('2025-11-30T13:05:00.000Z'),
2361
+ status: 200,
2362
+ pagination: {
2363
+ next: 'page token for next page',
2364
+ last: 'page token for last page'
2365
+ },
2366
+ items: [
2367
+ {
2368
+ id: 'JDhSWf9mT5OFxCkZfpDU5d',
2369
+ event: 'accepted',
2370
+ '@timestamp': new Date('2024-07-08T16:30:18.530Z'),
2371
+ account: {
2372
+ id: '12345'
2373
+ },
2374
+ delivery-status: {
2375
+ message: 'Turret client: server connection failed',
2376
+ 'attempt-no': 5,
2377
+ code: 680,
2378
+ 'session-seconds': 15.026,
2379
+ 'retry-seconds': 145
2380
+ },
2381
+ domain: {
2382
+ name: 'example.com'
2383
+ },
2384
+ recipient: 'example@gmail.com',
2385
+ 'recipient-domain': 'gmail.com',
2386
+ 'recipient-provider': 'Gmail',
2387
+ envelope: {
2388
+ sender: 'bob@example.com',
2389
+ transport: 'smtp',
2390
+ 'sending-ip': '198.52.100.1',
2391
+ targets: 'bob@example.com'
2392
+ }
2393
+ },
2394
+ ...
2395
+ ],
2396
+ aggregates: {}
2397
+ }
2398
+ ```
2399
+
2400
+
2312
2401
  ### Stats
2313
2402
  ***Deprecated, and will be removed in the future releases***
2314
2403
 
@@ -4675,6 +4764,7 @@ The following service methods are available to instantiated clients. The example
4675
4764
  ```
4676
4765
 
4677
4766
  - #### Sharing
4767
+
4678
4768
  - #### get
4679
4769
  The sharing status of a result.
4680
4770
 
@@ -1,10 +1,11 @@
1
1
  import NavigationThruPages from './common/NavigationThruPages.js';
2
2
  import { EventsList, EventsQuery, EventsResponse } from '../Types/Events/index.js';
3
3
  import Request from './common/Request.js';
4
- import { IEventClient } from '../Interfaces/index.js';
4
+ import { IEventClient, ILogger } from '../Interfaces/index.js';
5
5
  export default class EventClient extends NavigationThruPages<EventsList> implements IEventClient {
6
6
  request: Request;
7
- constructor(request: Request);
7
+ private logger;
8
+ constructor(request: Request, logger?: ILogger);
8
9
  protected parseList(response: EventsResponse): EventsList;
9
10
  get(domain: string, query?: EventsQuery): Promise<EventsList>;
10
11
  }
@@ -0,0 +1,12 @@
1
+ import Request from '../common/Request.js';
2
+ import { LogsList, LogsQuery } from '../../Types/Logs/Logs.js';
3
+ import { ILogsClient } from '../../Interfaces/Logs/ILogsClient.js';
4
+ export default class LogsClient implements ILogsClient {
5
+ request: Request;
6
+ constructor(request: Request);
7
+ private parseListResponse;
8
+ private prepareDate;
9
+ private parseQuery;
10
+ private validateQuery;
11
+ list(queryData: LogsQuery): Promise<LogsList>;
12
+ }
@@ -1,6 +1,7 @@
1
1
  import Request from './common/Request.js';
2
2
  import { MailgunClientOptions, InputFormData } from '../Types/index.js';
3
3
  import { IDomainsClient, IWebHooksClient, IMailgunClient, IMailingListsClient, IEventClient, IStatsClient, ISuppressionClient, IMessagesClient, IRoutesClient, IValidationClient, IIPsClient, IIPPoolsClient, ISubaccountsClient, IInboxPlacementsClient, IMetricsClient } from '../Interfaces/index.js';
4
+ import { ILogsClient } from '../Interfaces/Logs/ILogsClient.js';
4
5
  export default class MailgunClient implements IMailgunClient {
5
6
  request: Request;
6
7
  domains: IDomainsClient;
@@ -17,6 +18,7 @@ export default class MailgunClient implements IMailgunClient {
17
18
  lists: IMailingListsClient;
18
19
  subaccounts: ISubaccountsClient;
19
20
  inboxPlacements: IInboxPlacementsClient;
21
+ logs: ILogsClient;
20
22
  constructor(options: MailgunClientOptions, formData: InputFormData);
21
23
  setSubaccount(subaccountId: string): void;
22
24
  resetSubaccount(): void;
@@ -0,0 +1,4 @@
1
+ import { LogsList, LogsQuery } from '../../Types/Logs/index.js';
2
+ export interface ILogsClient {
3
+ list(query: LogsQuery): Promise<LogsList>;
4
+ }
@@ -0,0 +1 @@
1
+ export * from './ILogsClient.js';
@@ -13,6 +13,7 @@ import { ISubaccountsClient } from '../Subaccounts/index.js';
13
13
  import { IInboxPlacementsClient } from '../InboxPlacements/index.js';
14
14
  import { IMetricsClient } from '../Metrics/MetricsClient.js';
15
15
  import type Request from '../../Classes/common/Request.js';
16
+ import { ILogsClient } from '../Logs/ILogsClient.js';
16
17
  export interface IMailgunClient {
17
18
  request: Request;
18
19
  domains: IDomainsClient;
@@ -31,4 +32,5 @@ export interface IMailgunClient {
31
32
  inboxPlacements: IInboxPlacementsClient;
32
33
  setSubaccount(subaccountId: string): void;
33
34
  resetSubaccount(): void;
35
+ logs: ILogsClient;
34
36
  }
@@ -10,6 +10,7 @@ import type { ValidationQuery } from '../Validations/index.js';
10
10
  import type { IpPoolDeleteData } from '../IPPools/index.js';
11
11
  import type { MetricsQuery } from '../Metrics/index.js';
12
12
  import type { FormDataInput } from './FormData.js';
13
+ import { LogsQuery } from '../Logs/Logs.js';
13
14
  export type OnCallEmptyHeaders = {
14
15
  [key: string]: undefined;
15
16
  };
@@ -36,7 +37,7 @@ export type GetQueryTypes = IPsListQuery | RoutesListQuery | SubaccountsQuery |
36
37
  searchParams?: Array<Array<string>>;
37
38
  } | ValidationQuery;
38
39
  export type DeleteQueryTypes = DeletedDomainKeysQuery;
39
- export type PostDataTypes = InboxPlacementsData | MetricsQuery | string;
40
+ export type PostDataTypes = InboxPlacementsData | MetricsQuery | LogsQuery | string;
40
41
  export type PutDataTypes = SeedsListsUpdatingData | object | FormDataInput | ConnectionSettings;
41
42
  export type RequestData = IpPoolDeleteData | PostDataTypes | PutDataTypes | NodeFormData | FormData;
42
43
  export type ContainsPrefix<T extends string> = `${T}${string}`;
@@ -0,0 +1,172 @@
1
+ export type LogsFilterValue = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export type LogsFilter = {
6
+ AND: {
7
+ attribute: string;
8
+ comparator: string;
9
+ values: LogsFilterValue[];
10
+ }[];
11
+ };
12
+ export type LogsQuery = {
13
+ start?: Date;
14
+ end?: Date;
15
+ events?: string[];
16
+ 'metric_events'?: string[];
17
+ 'include_subaccounts'?: boolean;
18
+ 'include_totals'?: boolean;
19
+ pagination?: {
20
+ sort?: string;
21
+ token?: string;
22
+ limit?: number;
23
+ };
24
+ filter?: LogsFilter;
25
+ };
26
+ export type LogsParsedQuery = Omit<LogsQuery, 'start' | 'end'> & {
27
+ start?: string;
28
+ end?: string;
29
+ };
30
+ export type LogsDeliveryStatus = {
31
+ message?: string;
32
+ 'attempt-no'?: number;
33
+ 'code'?: number;
34
+ 'bounce-type'?: string;
35
+ description?: string;
36
+ 'session-seconds'?: number;
37
+ 'retry-seconds'?: number;
38
+ 'enhanced-code'?: string;
39
+ 'mx-host'?: string;
40
+ 'certificate-verified'?: boolean;
41
+ 'tls'?: boolean;
42
+ 'utf8'?: boolean;
43
+ 'first-delivery-attempt-seconds'?: number;
44
+ 'last-code'?: number;
45
+ 'last-message'?: string;
46
+ };
47
+ export type LogsEvent = {
48
+ id: string;
49
+ event: string;
50
+ '@timestamp': string;
51
+ account?: {
52
+ 'parent-id': string;
53
+ 'id': string;
54
+ };
55
+ campaigns?: {
56
+ id: string;
57
+ name: string;
58
+ }[];
59
+ tags?: string[];
60
+ method?: string;
61
+ 'originating-ip'?: string;
62
+ 'api-key-id'?: string;
63
+ 'delivery-status'?: LogsDeliveryStatus;
64
+ 'i-delivery-optimizer'?: string;
65
+ domain: {
66
+ name: string;
67
+ };
68
+ recipient?: string;
69
+ 'recipient-domain'?: string;
70
+ 'recipient-provider'?: string;
71
+ envelope?: {
72
+ sender?: string;
73
+ transport?: string;
74
+ 'sending-ip'?: string;
75
+ targets?: string;
76
+ 'i-ip-pool-id'?: string;
77
+ };
78
+ storage?: {
79
+ region?: string;
80
+ env?: string;
81
+ key?: string;
82
+ url?: string[];
83
+ };
84
+ template?: {
85
+ name?: string;
86
+ version?: string;
87
+ 'is-text'?: boolean;
88
+ };
89
+ 'log-level'?: string;
90
+ 'user-variables'?: string;
91
+ 'message'?: {
92
+ headers?: {
93
+ to: string;
94
+ 'message-id': string;
95
+ from: string;
96
+ subject: string;
97
+ };
98
+ attachments?: {
99
+ filename?: string;
100
+ 'content-type'?: string;
101
+ size?: number;
102
+ }[];
103
+ recipients?: string[];
104
+ size?: number;
105
+ 'scheduled-for'?: number;
106
+ };
107
+ flags?: {
108
+ 'is-authenticated': boolean;
109
+ 'is-system-test': boolean;
110
+ 'is-routed': boolean;
111
+ 'is-amp'?: boolean;
112
+ 'is-test-mode': boolean;
113
+ 'is-delayed-bounce': boolean;
114
+ 'is-callback': boolean;
115
+ 'is-encrypted': boolean;
116
+ };
117
+ 'primary-dkim'?: string;
118
+ ip?: string;
119
+ geolocation?: {
120
+ city?: string;
121
+ country?: string;
122
+ region?: string;
123
+ timezone?: string;
124
+ };
125
+ 'client-info'?: {
126
+ 'client-name'?: string;
127
+ 'client-os'?: string;
128
+ 'client-type'?: string;
129
+ 'device-type'?: string;
130
+ 'user-agent'?: string;
131
+ ip?: string;
132
+ bot?: string;
133
+ };
134
+ severity?: string;
135
+ reason?: string;
136
+ routes?: {
137
+ actions?: string;
138
+ description?: string;
139
+ expression?: string;
140
+ id?: string;
141
+ priority?: number;
142
+ match?: {
143
+ recipient?: string;
144
+ };
145
+ };
146
+ 'mailing-list'?: {
147
+ address?: string;
148
+ 'list-id'?: string;
149
+ sid?: string;
150
+ };
151
+ url?: string;
152
+ };
153
+ export type LogsEventItem = Omit<LogsEvent, '@timestamp'> & {
154
+ '@timestamp': Date;
155
+ };
156
+ export type LogsList = {
157
+ start: Date;
158
+ end: Date;
159
+ items: LogsEventItem[];
160
+ pagination: {
161
+ previous?: string;
162
+ first?: string;
163
+ last?: string;
164
+ next?: string;
165
+ total?: number;
166
+ };
167
+ aggregates: {
168
+ all: number;
169
+ metrics: object;
170
+ };
171
+ status: number;
172
+ };
@@ -0,0 +1 @@
1
+ export * from './Logs.js';
@@ -13,3 +13,4 @@ export * from './Subaccounts/index.js';
13
13
  export * from './Suppressions/index.js';
14
14
  export * from './Validations/index.js';
15
15
  export * from './Webhooks/index.js';
16
+ export * from './Logs/index.js';
package/Types/index.js CHANGED
@@ -5216,9 +5216,11 @@ var NavigationThruPages = /** @class */ (function () {
5216
5216
 
5217
5217
  var EventClient = /** @class */ (function (_super) {
5218
5218
  __extends(EventClient, _super);
5219
- function EventClient(request) {
5219
+ function EventClient(request, logger) {
5220
+ if (logger === void 0) { logger = console; }
5220
5221
  var _this = _super.call(this, request) || this;
5221
5222
  _this.request = request;
5223
+ _this.logger = logger;
5222
5224
  return _this;
5223
5225
  }
5224
5226
  EventClient.prototype.parseList = function (response) {
@@ -5231,6 +5233,7 @@ var EventClient = /** @class */ (function (_super) {
5231
5233
  EventClient.prototype.get = function (domain, query) {
5232
5234
  return __awaiter(this, void 0, void 0, function () {
5233
5235
  return __generator(this, function (_a) {
5236
+ this.logger.warn('"events.get" method is deprecated. Please use "logs.list" instead');
5234
5237
  return [2 /*return*/, this.requestListWithPages(urljoin('/v3', domain, 'events'), query)];
5235
5238
  });
5236
5239
  });
@@ -7113,6 +7116,97 @@ var DomainKeysClient = /** @class */ (function (_super) {
7113
7116
  return DomainKeysClient;
7114
7117
  }(NavigationThruPages));
7115
7118
 
7119
+ var LogsClient = /** @class */ (function () {
7120
+ function LogsClient(request) {
7121
+ this.request = request;
7122
+ }
7123
+ LogsClient.prototype.parseListResponse = function (response) {
7124
+ var parsedResponse = {
7125
+ start: new Date(response.body.start),
7126
+ end: new Date(response.body.end),
7127
+ status: response.status,
7128
+ pagination: response.body.pagination,
7129
+ items: response.body.items.map(function (item) {
7130
+ var responseItem = __assign(__assign({}, item), { '@timestamp': new Date(item['@timestamp']) });
7131
+ return responseItem;
7132
+ }),
7133
+ aggregates: response.body.aggregates
7134
+ };
7135
+ return parsedResponse;
7136
+ };
7137
+ LogsClient.prototype.prepareDate = function (date) {
7138
+ // 'Wed, 03 Dec 2025 00:00:00 -0000'
7139
+ var formattedDate = "".concat(date.toUTCString().slice(0, 25), " -0000");
7140
+ return formattedDate;
7141
+ };
7142
+ LogsClient.prototype.parseQuery = function (queryData) {
7143
+ var res = __assign(__assign({}, queryData), { start: '', end: '' });
7144
+ if (queryData.start) {
7145
+ res.start = this.prepareDate(queryData.start);
7146
+ }
7147
+ if (queryData.end) {
7148
+ res.end = this.prepareDate(queryData.end);
7149
+ }
7150
+ return res;
7151
+ };
7152
+ LogsClient.prototype.validateQuery = function (queryData) {
7153
+ if (!queryData) {
7154
+ throw APIError.getUserDataError('Missed parameter "query"', '"logs.list": Query data is required');
7155
+ }
7156
+ if (queryData === null || queryData === void 0 ? void 0 : queryData.start) {
7157
+ if ((!((queryData === null || queryData === void 0 ? void 0 : queryData.start) instanceof Date) || Number.isNaN(queryData.start.getTime()))) {
7158
+ throw APIError.getUserDataError('Incorrect type', '"logs.list": Type of "start" must be valid JS Data object');
7159
+ }
7160
+ }
7161
+ else {
7162
+ throw APIError.getUserDataError('Missed property', '"logs.list": "start" property is required');
7163
+ }
7164
+ if (queryData === null || queryData === void 0 ? void 0 : queryData.end) {
7165
+ if ((!((queryData === null || queryData === void 0 ? void 0 : queryData.end) instanceof Date) || Number.isNaN(queryData.end.getTime()))) {
7166
+ throw APIError.getUserDataError('Incorrect type', '"logs.list": Type of "end" must be valid JS Data object');
7167
+ }
7168
+ }
7169
+ if (queryData.filter) {
7170
+ if (!queryData.filter.AND) {
7171
+ throw APIError.getUserDataError('Incorrect filter', '"logs.list": Logs filter must have AND operator');
7172
+ }
7173
+ if (!Array.isArray(queryData.filter.AND) || queryData.filter.AND.length === 0) {
7174
+ throw APIError.getUserDataError('Incorrect filter', '"logs.list": Logs filter AND operator must be an array');
7175
+ }
7176
+ queryData.filter.AND.forEach(function (condition) {
7177
+ if (!condition.attribute || !condition.comparator || !condition.values) {
7178
+ throw APIError.getUserDataError('Incorrect filter', '"logs.list": Each condition in Logs filter AND operator must have attribute, comparator and values');
7179
+ }
7180
+ if (!Array.isArray(condition.values) || condition.values.length === 0) {
7181
+ throw APIError.getUserDataError('Incorrect filter', '"logs.list": Values in each condition of Logs filter AND operator must be an array');
7182
+ }
7183
+ condition.values.forEach(function (value) {
7184
+ if (!value.label || !value.value) {
7185
+ throw APIError.getUserDataError('Incorrect filter', '"logs.list": Each value in Logs filter condition must have label and value');
7186
+ }
7187
+ });
7188
+ });
7189
+ }
7190
+ };
7191
+ LogsClient.prototype.list = function (queryData) {
7192
+ return __awaiter(this, void 0, void 0, function () {
7193
+ var preparedQuery, response;
7194
+ return __generator(this, function (_a) {
7195
+ switch (_a.label) {
7196
+ case 0:
7197
+ this.validateQuery(queryData);
7198
+ preparedQuery = this.parseQuery(queryData);
7199
+ return [4 /*yield*/, this.request.post(urljoin('/v1/analytics/logs'), preparedQuery)];
7200
+ case 1:
7201
+ response = _a.sent();
7202
+ return [2 /*return*/, this.parseListResponse(response)];
7203
+ }
7204
+ });
7205
+ });
7206
+ };
7207
+ return LogsClient;
7208
+ }());
7209
+
7116
7210
  var MailgunClient = /** @class */ (function () {
7117
7211
  function MailgunClient(options, formData) {
7118
7212
  var config = __assign({}, options);
@@ -7159,6 +7253,7 @@ var MailgunClient = /** @class */ (function () {
7159
7253
  this.validate = new ValidateClient(this.request, multipleValidationClient);
7160
7254
  this.subaccounts = new SubaccountsClient(this.request);
7161
7255
  this.inboxPlacements = new InboxPlacementsClient(this.request, seedsListsClient, inboxPlacementsResultsClient, inboxPlacementsProvidersClient);
7256
+ this.logs = new LogsClient(this.request);
7162
7257
  }
7163
7258
  MailgunClient.prototype.setSubaccount = function (subaccountId) {
7164
7259
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailgun.js",
3
- "version": "12.3.1",
3
+ "version": "12.4.1",
4
4
  "author": "Mailgun",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/version.md CHANGED
@@ -1 +1 @@
1
- 12.3.1
1
+ 12.4.1