Socket
Socket
Sign inDemoInstall

mailgun.js

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun.js - npm Package Compare versions

Comparing version 3.1.2 to 3.2.0

dist/lib/interfaces/IpPools.d.ts

2

dist/lib/client.d.ts

@@ -13,2 +13,3 @@ import Request from './request';

import IpsClient from './ips';
import IpPoolsClient from './ip-pools';
export default class Client {

@@ -27,3 +28,4 @@ private request;

ips: IpsClient;
ip_pools: IpPoolsClient;
constructor(options: Options, formData: FormData);
}

@@ -70,3 +70,11 @@ import Request from './request';

}>;
linkIpPool(domain: string, pool_id: string): Promise<{
body: any;
status: number;
}>;
unlinkIpPoll(domain: string, pool_id: string, ip: string): Promise<{
body: any;
status: number;
}>;
}
export {};

2

dist/mailgun.js.LICENSE.txt
/*! MIT License © Sindre Sorhus */
/*! mailgun.js v3.1.2 */
/*! mailgun.js v3.2.0 */

@@ -17,2 +17,3 @@ const defaults = require('lodash.defaults');

import IpsClient from './ips';
import IpPoolsClient from './ip-pools';

@@ -33,2 +34,3 @@ export default class Client {

public ips;
public ip_pools;

@@ -59,2 +61,3 @@ constructor(options: Options, formData: FormData) {

this.ips = new IpsClient(this.request);
this.ip_pools = new IpPoolsClient(this.request);

@@ -61,0 +64,0 @@ if (config.public_key) {

@@ -134,2 +134,10 @@ import map from 'lodash.map';

}
linkIpPool(domain: string, pool_id: string) {
return this.request.post(urljoin('/v2/domains', domain, 'ips'), { pool_id });
}
unlinkIpPoll(domain: string, pool_id: string, ip: string) {
return this.request.delete(urljoin('/v2/domains', domain, 'ips', 'ip_pool'), { pool_id, ip });
}
}
{
"name": "mailgun.js",
"version": "3.1.2",
"version": "3.2.0",
"main": "dist/mailgun.js",

@@ -64,4 +64,4 @@ "types": "dist/index.d.ts",

"json-loader": "^0.5.7",
"mocha": "^2.2.3",
"mocha-multi": "^0.7.1",
"mocha": "^8.2.1",
"mocha-multi": "^1.1.3",
"nock": "^13.0.4",

@@ -68,0 +68,0 @@ "path-browserify": "^1.0.1",

@@ -30,3 +30,3 @@ const formData = require('form-data'); // importing this way to not have type error in line 13

describe('create with attachments', function () {
it('sends a custom attachment', async function (done) {
it('sends a custom attachment', async function () {
api.post('/v3/sandbox.mailgun.org/messages').reply(200, {

@@ -37,3 +37,3 @@ message: 'Queued. Thank you.',

client.create('sandbox.mailgun.org', {
const res = await client.create('sandbox.mailgun.org', {
to: 'foo@example.com',

@@ -47,8 +47,7 @@ from: 'bar@example.com',

}]
}).then(function (data: { message: string }) {
expect(data.message).to.eql('Queued. Thank you.');
done();
});
})
expect(res.message).to.eql('Queued. Thank you.');
});
});
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc