mailgun.js 4.0.1 → 4.1.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 CHANGED
@@ -2,6 +2,13 @@
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
+ ## [4.1.0](https://github.com/mailgun/mailgun.js/compare/v4.0.1...v4.1.0) (2021-11-30)
6
+
7
+
8
+ ### Features
9
+
10
+ * Add support of whitelists into suppressions client ([#214](https://github.com/mailgun/mailgun.js/issues/214)) ([1e4fb84](https://github.com/mailgun/mailgun.js/commits/1e4fb84d2528751a9c2dddd1599d2bc0e12b1fdd))
11
+
5
12
  ### [4.0.1](https://github.com/mailgun/mailgun.js/compare/v4.0.0...v4.0.1) (2021-11-25)
6
13
 
7
14
 
@@ -13,3 +13,9 @@ export interface UnsubscribeData {
13
13
  tags: any;
14
14
  created_at: string | Date;
15
15
  }
16
+ export interface WhiteListData {
17
+ type: string;
18
+ value: string;
19
+ reason: string;
20
+ createdAt: string | Date;
21
+ }
@@ -1,5 +1,5 @@
1
1
  import Request from './request';
2
- import { BounceData, ComplaintData, UnsubscribeData } from './interfaces/Supressions';
2
+ import { BounceData, ComplaintData, UnsubscribeData, WhiteListData } from './interfaces/Supressions';
3
3
  declare class Bounce {
4
4
  type: string;
5
5
  address: string;
@@ -21,13 +21,21 @@ declare class Unsubscribe {
21
21
  created_at: Date;
22
22
  constructor(data: UnsubscribeData);
23
23
  }
24
- declare type TModel = typeof Bounce | typeof Complaint | typeof Unsubscribe;
24
+ declare class WhiteList {
25
+ type: string;
26
+ value: string;
27
+ reason: string;
28
+ createdAt: Date;
29
+ constructor(data: WhiteListData);
30
+ }
31
+ declare type TModel = typeof Bounce | typeof Complaint | typeof Unsubscribe | typeof WhiteList;
25
32
  export default class SuppressionClient {
26
33
  request: any;
27
34
  models: {
28
35
  bounces: typeof Bounce;
29
36
  complaints: typeof Complaint;
30
37
  unsubscribes: typeof Unsubscribe;
38
+ whitelists: typeof WhiteList;
31
39
  };
32
40
  constructor(request: Request);
33
41
  _parsePage(id: string, pageUrl: string): {
@@ -49,7 +57,8 @@ export default class SuppressionClient {
49
57
  }, Model: TModel): any;
50
58
  _parseItem(response: {
51
59
  body: any;
52
- }, Model: TModel): Bounce | Complaint | Unsubscribe;
60
+ }, Model: TModel): Bounce | Complaint | Unsubscribe | WhiteList;
61
+ private createWhiteList;
53
62
  list(domain: string, type: string, query: any): any;
54
63
  get(domain: string, type: string, address: string): any;
55
64
  create(domain: string, type: string, data: any): any;