mailgun.js 5.2.0 → 6.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.
@@ -2,4 +2,4 @@
2
2
 
3
3
  /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */
4
4
 
5
- /*! mailgun.js v5.1.0 */
5
+ /*! mailgun.js v5.2.2 */
@@ -5,6 +5,6 @@ export default class MultipleValidationClient implements IMultipleValidationClie
5
5
  constructor(request: Request);
6
6
  list(): Promise<MultipleValidationJobsListResult>;
7
7
  get(listId: string): Promise<MultipleValidationJob>;
8
- create(listId: string, file: any): Promise<CreatedMultipleValidationJob>;
8
+ create(listId: string, file: Record<string, unknown>): Promise<CreatedMultipleValidationJob>;
9
9
  destroy(listId: string): Promise<CanceledMultipleValidationJob>;
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailgun.js",
3
- "version": "5.2.0",
3
+ "version": "6.0.0",
4
4
  "main": "./mailgun.node.js",
5
5
  "browser": "./mailgun.web.js",
6
6
  "types": "./index.d.ts",
package/request.d.ts CHANGED
@@ -1,31 +1,26 @@
1
1
  import * as NodeFormData from 'form-data';
2
- import RequestOptions from './interfaces/RequestOptions';
2
+ import { RequestOptions } from './interfaces/RequestOptions';
3
3
  import { InputFormData } from './interfaces/IFormData';
4
4
  import APIResponse from './interfaces/ApiResponse';
5
+ import { IpPoolDeleteData } from './interfaces/IpPools';
5
6
  declare class Request {
6
7
  private username;
7
8
  private key;
8
9
  private url;
9
10
  private timeout;
10
11
  private headers;
11
- private FormDataConstructor;
12
+ private formDataBuilder;
12
13
  constructor(options: RequestOptions, formData: InputFormData);
13
- request(method: string, url: string, inputOptions?: any): Promise<APIResponse>;
14
- query(method: string, url: string, query: any, options?: any): Promise<APIResponse>;
15
- command(method: string, url: string, data: any, options?: any): Promise<APIResponse>;
16
- get(url: string, query?: any, options?: any): Promise<APIResponse>;
17
- head(url: string, query: any, options: any): Promise<APIResponse>;
18
- options(url: string, query: any, options: any): Promise<APIResponse>;
19
- post(url: string, data: any, options?: any): Promise<APIResponse>;
20
- postWithFD(url: string, data: any): Promise<APIResponse>;
21
- putWithFD(url: string, data: any): Promise<APIResponse>;
22
- patchWithFD(url: string, data: any): Promise<APIResponse>;
23
- createFormData(data: any): NodeFormData | FormData;
24
- private addMimeDataToFD;
25
- private addFilesToFD;
26
- private addCommonPropertyToFD;
27
- put(url: string, data: any, options?: any): Promise<APIResponse>;
28
- patch(url: string, data: any, options?: any): Promise<APIResponse>;
29
- delete(url: string, data?: any, options?: any): Promise<APIResponse>;
14
+ request(method: string, url: string, onCallOptions?: Record<string, unknown | Record<string, unknown>>): Promise<APIResponse>;
15
+ private getResponseBody;
16
+ query(method: string, url: string, query?: Record<string, unknown> | Array<Array<string>>, options?: Record<string, unknown>): Promise<APIResponse>;
17
+ command(method: string, url: string, data?: Record<string, unknown> | string | NodeFormData | FormData, options?: Record<string, unknown>, addDefaultHeaders?: boolean): Promise<APIResponse>;
18
+ get(url: string, query?: Record<string, unknown> | Array<Array<string>>, options?: Record<string, unknown>): Promise<APIResponse>;
19
+ post(url: string, data?: Record<string, unknown> | string, options?: Record<string, unknown>): Promise<APIResponse>;
20
+ postWithFD(url: string, data: Record<string, unknown> | Record<string, unknown>[]): Promise<APIResponse>;
21
+ putWithFD(url: string, data: Record<string, unknown>): Promise<APIResponse>;
22
+ patchWithFD(url: string, data: Record<string, unknown>): Promise<APIResponse>;
23
+ put(url: string, data?: Record<string, unknown> | string, options?: Record<string, unknown>): Promise<APIResponse>;
24
+ delete(url: string, data?: IpPoolDeleteData): Promise<APIResponse>;
30
25
  }
31
26
  export default Request;
package/version.md CHANGED
@@ -1 +1 @@
1
- 5.2.0
1
+ 6.0.0