mailgun.js
Advanced tools
Comparing version 1.4.0 to 2.0.1
@@ -8,11 +8,2 @@ 'use strict'; | ||
class Event { | ||
constructor(data) { | ||
this.type = data.type; | ||
this.summary = data.gist; | ||
this.content = data.content; | ||
this.timestamp = new Date(data.timestamp); | ||
} | ||
} | ||
class EventClient { | ||
@@ -41,8 +32,6 @@ constructor(request) { | ||
_parseEventList(response) { | ||
var items; | ||
items = map(response.body.items, data => new Event(data)); | ||
items.pages = this._parsePageLinks(response); | ||
return items; | ||
return { | ||
items: response.body.items, | ||
pages: this._parsePageLinks(response) | ||
}; | ||
} | ||
@@ -49,0 +38,0 @@ |
{ | ||
"name": "mailgun.js", | ||
"version": "1.4.0", | ||
"version": "2.0.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": "Mailgun", |
300
README.md
@@ -10,12 +10,12 @@ # Mailgun.js [![Build Status](https://travis-ci.org/mailgun/mailgun-js.svg)](https://travis-ci.org/mailgun/mailgun-js) | ||
- [Documentation](#documentation) | ||
- [Install](#install) | ||
- [Setup Client](#setup-client) | ||
- [Methods](#methods) | ||
- [Browser Demo](#browser-demo) | ||
- [Examples](https://github.com/mailgun/mailgun-js/tree/c379f79ea2a2e0f825103751a3a102d8bdd3dd1b/example) | ||
- [Install](#install) | ||
- [Setup Client](#setup-client) | ||
- [Methods](#methods) | ||
- [Browser Demo](#browser-demo) | ||
- [Examples](https://github.com/mailgun/mailgun-js/tree/c379f79ea2a2e0f825103751a3a102d8bdd3dd1b/example) | ||
- [Development](#development) | ||
- [Requirements](#requirements) | ||
- [Build](#build) | ||
- [Tests](#tests) | ||
- [Release Process](#release-process) | ||
- [Requirements](#requirements) | ||
- [Build](#build) | ||
- [Tests](#tests) | ||
- [Release Process](#release-process) | ||
@@ -47,35 +47,35 @@ # Documentation | ||
- [messages](#messages) | ||
- [create](#create) | ||
- [create](#create) | ||
- [domains](#domains) | ||
- [list](#list) | ||
- [get](#get) | ||
- [create](#create-1) | ||
- [destroy](#destroy) | ||
- [getTracking](#gettracking) | ||
- [updateTracking](#updatetracking) | ||
- [list](#list) | ||
- [get](#get) | ||
- [create](#create-1) | ||
- [destroy](#destroy) | ||
- [getTracking](#gettracking) | ||
- [updateTracking](#updatetracking) | ||
- [events](#events) | ||
- [get](#get-1) | ||
- [get](#get-1) | ||
- [stats](#stats) | ||
- [getDomain](#getdomain) | ||
- [getAccount](#getaccount) | ||
- [getDomain](#getdomain) | ||
- [getAccount](#getaccount) | ||
- [suppressions](#suppressions) | ||
- [list](#list-1) | ||
- [get](#get-2) | ||
- [create](#create-2) | ||
- [list](#list-1) | ||
- [get](#get-2) | ||
- [create](#create-2) | ||
- [webhooks](#webhooks) | ||
- [list](#list-2) | ||
- [get](#get-3) | ||
- [create](#create-3) | ||
- [update](#update) | ||
- [destroy](#destroy-1) | ||
- [list](#list-2) | ||
- [get](#get-3) | ||
- [create](#create-3) | ||
- [update](#update) | ||
- [destroy](#destroy-1) | ||
- [routes](#routes) | ||
- [list](#list-3) | ||
- [get](#get-4) | ||
- [create](#create-4) | ||
- [update](#update-1) | ||
- [destroy](#destroy-2) | ||
- [list](#list-3) | ||
- [get](#get-4) | ||
- [create](#create-4) | ||
- [update](#update-1) | ||
- [destroy](#destroy-2) | ||
- [validate](#validate) | ||
- [get](#get-5) | ||
- [get](#get-5) | ||
- [parse](#parse) | ||
- [get](#get-6) | ||
- [get](#get-6) | ||
@@ -352,13 +352,13 @@ Method naming conventions: | ||
{ | ||
"click": { | ||
"active": false | ||
}, | ||
"open": { | ||
"active": false | ||
}, | ||
"unsubscribe": { | ||
"active": false, | ||
"html_footer": "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
"text_footer": "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
} | ||
"click": { | ||
"active": false | ||
}, | ||
"open": { | ||
"active": false | ||
}, | ||
"unsubscribe": { | ||
"active": false, | ||
"html_footer": "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
"text_footer": "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
} | ||
} | ||
@@ -389,6 +389,6 @@ ``` | ||
{ | ||
message: 'Tracking settings have been updated', | ||
open: { | ||
active: true | ||
} | ||
message: 'Tracking settings have been updated', | ||
open: { | ||
active: true | ||
} | ||
} | ||
@@ -415,6 +415,6 @@ ``` | ||
{ | ||
message: 'Tracking settings have been updated', | ||
click: { | ||
active: true | ||
} | ||
message: 'Tracking settings have been updated', | ||
click: { | ||
active: true | ||
} | ||
} | ||
@@ -427,6 +427,6 @@ ``` | ||
mg.domains.updateTracking('foobar.example.com', 'unsubscribe', { | ||
active: true, | ||
html_footer: "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
text_footer: "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
}) | ||
active: true, | ||
html_footer: "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
text_footer: "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
}) | ||
.then(msg => console.log(msg)) // logs response data | ||
@@ -448,8 +448,8 @@ .catch(err => console.log(err)); // logs any error | ||
{ | ||
message: 'Tracking settings have been updated', | ||
"unsubscribe": { | ||
"active": true, | ||
"html_footer": "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
"text_footer": "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
} | ||
message: 'Tracking settings have been updated', | ||
"unsubscribe": { | ||
"active": true, | ||
"html_footer": "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", | ||
"text_footer": "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" | ||
} | ||
} | ||
@@ -489,13 +489,13 @@ ``` | ||
items: [{ | ||
type: 'accepted', | ||
summary: 'got it', | ||
content: { more: 'data' }, | ||
timestamp: Wed Nov 19 2014 10:32:57 GMT-0800 (PST) }, | ||
}], | ||
pages: { | ||
first: { id: 'first', number: 'W3siYSI6IGZhbHNlLC', url: 'apiurl' }, | ||
type: 'accepted', | ||
summary: 'got it', | ||
content: { more: 'data' }, | ||
timestamp: Wed Nov 19 2014 10:32:57 GMT-0800 (PST) }, | ||
}], | ||
pages: { | ||
first: { id: 'first', number: 'W3siYSI6IGZhbHNlLC', url: 'apiurl' }, | ||
last: { id: 'last', number: 'W3siYSI6IGZhbHNlLC', url: 'apiurl' }, | ||
next: { id: 'next', number: W3siYSI6IGZhbHNlLC'', url: 'apiurl' }, | ||
previous: { id: 'previous', number: 'W3siYSI6IGZhbHNlLC', url: 'apiurl' } | ||
} | ||
} | ||
} | ||
@@ -561,5 +561,5 @@ ``` | ||
stats: [{ | ||
time: Sun Mar 15 2015 17:00:00 GMT-0700 (PDT), | ||
delivered: { smtp: 2, http: 1, total: 3 } | ||
}] | ||
time: Sun Mar 15 2015 17:00:00 GMT-0700 (PDT), | ||
delivered: { smtp: 2, http: 1, total: 3 } | ||
}] | ||
} | ||
@@ -588,5 +588,5 @@ ``` | ||
stats: [{ | ||
time: Sun Mar 15 2015 17:00:00 GMT-0700 (PDT), | ||
delivered: { smtp: 2, http: 1, total: 3 } | ||
}] | ||
time: Sun Mar 15 2015 17:00:00 GMT-0700 (PDT), | ||
delivered: { smtp: 2, http: 1, total: 3 } | ||
}] | ||
} | ||
@@ -629,17 +629,17 @@ ``` | ||
{ | ||
items: [ | ||
{ | ||
type: 'bounces', | ||
address: 'unknown@unknown.com', | ||
code: 550, | ||
error: 'No such mailbox', | ||
created_at: Fri Oct 21 2011 04:02:55 GMT-0700 (PDT) | ||
} | ||
], | ||
pages: { | ||
first: { id: 'first', page: '', address: '', url: 'apiurl' }, | ||
items: [ | ||
{ | ||
type: 'bounces', | ||
address: 'unknown@unknown.com', | ||
code: 550, | ||
error: 'No such mailbox', | ||
created_at: Fri Oct 21 2011 04:02:55 GMT-0700 (PDT) | ||
} | ||
], | ||
pages: { | ||
first: { id: 'first', page: '', address: '', url: 'apiurl' }, | ||
last: { id: 'last', page: '', address: '', url: 'apiurl' }, | ||
next: { id: 'next', page: '', address: '', url: 'apiurl' }, | ||
previous: { id: 'prev', page: '', address: '', url: 'apiurl' } | ||
} | ||
} | ||
} | ||
@@ -682,3 +682,3 @@ ``` | ||
{ | ||
type: 'bounces', | ||
type: 'bounces', | ||
address: 'address?@unknown.com', | ||
@@ -784,11 +784,11 @@ tags: [ '*' ], | ||
{ | ||
open: { 'url': 'http://requestb.in' }, | ||
click: { 'url': 'http://requestb.in' }, | ||
bounce: { 'url': 'http://requestb.in' }, | ||
deliver: { 'url': 'http://requestb.in' }, | ||
drop: { 'url': 'http://requestb.in' }, | ||
spam: { 'url': 'http://requestb.in' }, | ||
unsubscribe: { 'url': 'http://requestb.in' }, | ||
click: { 'url': 'http://requestb.in' }, | ||
open: { 'url': 'http://requestb.in' }, | ||
open: { 'url': 'http://requestb.in' }, | ||
click: { 'url': 'http://requestb.in' }, | ||
bounce: { 'url': 'http://requestb.in' }, | ||
deliver: { 'url': 'http://requestb.in' }, | ||
drop: { 'url': 'http://requestb.in' }, | ||
spam: { 'url': 'http://requestb.in' }, | ||
unsubscribe: { 'url': 'http://requestb.in' }, | ||
click: { 'url': 'http://requestb.in' }, | ||
open: { 'url': 'http://requestb.in' }, | ||
} | ||
@@ -813,3 +813,3 @@ ``` | ||
{ | ||
'open': { 'url': 'http://requestb.in' } | ||
'open': { 'url': 'http://requestb.in' } | ||
} | ||
@@ -834,3 +834,3 @@ ``` | ||
{ | ||
'open': { 'url': 'http://requestb.in' } | ||
'open': { 'url': 'http://requestb.in' } | ||
} | ||
@@ -851,4 +851,4 @@ ``` | ||
{ | ||
'code': '500', | ||
'message': 'Hi!' | ||
'code': '500', | ||
'message': 'Hi!' | ||
} | ||
@@ -873,3 +873,3 @@ ``` | ||
{ | ||
'open': { 'url': 'http://requestb.in' } | ||
'open': { 'url': 'http://requestb.in' } | ||
} | ||
@@ -894,3 +894,3 @@ ``` | ||
{ | ||
'open': { 'url': 'http://requestb.in' } | ||
'open': { 'url': 'http://requestb.in' } | ||
} | ||
@@ -919,7 +919,7 @@ ``` | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
} | ||
@@ -945,8 +945,8 @@ ] | ||
{ | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
} | ||
@@ -963,7 +963,7 @@ ``` | ||
mg.routes.create({ | ||
priority: 0, | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.org")', | ||
action: ['forward("http://myhost.com/messages/")', 'stop()'] | ||
}) | ||
priority: 0, | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.org")', | ||
action: ['forward("http://myhost.com/messages/")', 'stop()'] | ||
}) | ||
.then(data => console.log(data)) // logs response body | ||
@@ -977,8 +977,8 @@ .catch(err => console.log(err)); // logs any error | ||
{ | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
priority: 0 | ||
} | ||
@@ -995,7 +995,7 @@ ``` | ||
mg.routes.update('562da483125730608a7d1719', { | ||
priority: 0, | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.org")', | ||
action: ['forward("http://myhost.com/messages/")', 'stop()'] | ||
}) | ||
priority: 0, | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.org")', | ||
action: ['forward("http://myhost.com/messages/")', 'stop()'] | ||
}) | ||
.then(data => console.log(data)) // logs response body | ||
@@ -1009,9 +1009,9 @@ .catch(err => console.log(err)); // logs any error | ||
{ | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
message: 'Route has been updated', | ||
priority: 0 | ||
actions: [ 'forward("http://myhost.com/messages/")', 'stop()' ], | ||
created_at: 'Mon, 26 Oct 2015 03:56:51 GMT', | ||
description: 'sample', | ||
expression: 'match_recipient(".*@example.com")', | ||
id: '562da483125730608a7d1719', | ||
message: 'Route has been updated', | ||
priority: 0 | ||
} | ||
@@ -1036,4 +1036,4 @@ ``` | ||
{ | ||
id: '562da483125730608a7d1719', | ||
message: 'Route has been deleted' | ||
id: '562da483125730608a7d1719', | ||
message: 'Route has been deleted' | ||
} | ||
@@ -1085,7 +1085,7 @@ ``` | ||
{ | ||
parsed: [], | ||
parsed: [], | ||
unparseable: [ | ||
'Alice <alice@example.com>', | ||
'Alice <alice@example.com>', | ||
'example.com' | ||
] | ||
] | ||
} | ||
@@ -1170,2 +1170,14 @@ ``` | ||
- add missing services | ||
- Lists | ||
- `lists.list(query)` | ||
- `list.get(address)` | ||
- `list.create(data)` | ||
- `list.update(address, data)` | ||
- `list.destroy(address)` | ||
- `lists.listMembers(address, query)` | ||
- `list.getMember(address, memberAddress)` | ||
- `list.createMember(address, data)` (singe & json batch upload) | ||
- `list.updateMember(address, memberAddress, data)` | ||
- `list.updateMember(address, memberAddress, data)` | ||
- `list.destroyMember(address, memberAddress)` | ||
- add browser demo to heroku |
@@ -23,13 +23,15 @@ var nock = require('nock'); | ||
response = { | ||
'items': [{ | ||
'type': 'accepted', | ||
'timestamp': 'Wed, 19 Nov 2014 18:32:57 GMT', | ||
'gist': 'got it', | ||
'content': { 'more': 'data' } | ||
}, { | ||
'type': 'opened', | ||
'timestamp': 'Tue, 18 Nov 2014 12:32:57 GMT', | ||
'gist': 'sent', | ||
'content': { 'more': 'data' } | ||
}], | ||
'items': [ | ||
{ | ||
'type': 'accepted', | ||
'timestamp': 'Wed, 19 Nov 2014 18:32:57 GMT', | ||
'gist': 'got it', | ||
'content': { 'more': 'data' } | ||
}, { | ||
'type': 'opened', | ||
'timestamp': 'Tue, 18 Nov 2014 12:32:57 GMT', | ||
'gist': 'sent', | ||
'content': { 'more': 'data' } | ||
} | ||
], | ||
'paging': { | ||
@@ -47,15 +49,15 @@ 'first': 'https://api.mailgun.net/v2/mailgun.com/events/W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImEiOiBmYWxzZSwgImIiOiAiMjAxNC0xMS0xOVQyMDo1NjoyMS42NDAyMTErMDA6MDAifSwgWyJ4IiwgImUiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCBudWxsLCBbWyJkb21haW4ubmFtZSIsICJtYWlsZ3VuLmNvbSJdLCBbImFjY291bnQuaWQiLCAiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxIl1dXQ==', | ||
return client.get('domain.com').then(function(events) { | ||
return client.get('domain.com').then(function(data) { | ||
var e; | ||
e = events[0]; | ||
e = data.items[0]; | ||
e.type.should.eql('accepted'); | ||
e.summary.should.eql('got it'); | ||
e.timestamp.toUTCString().should.eql('Wed, 19 Nov 2014 18:32:57 GMT'); | ||
e.gist.should.eql('got it'); | ||
e.timestamp.should.eql('Wed, 19 Nov 2014 18:32:57 GMT'); | ||
e.content.should.eql({ 'more': 'data' }); | ||
e = events[1]; | ||
e = data.items[1]; | ||
e.type.should.eql('opened'); | ||
e.summary.should.eql('sent'); | ||
e.timestamp.toUTCString().should.eql('Tue, 18 Nov 2014 12:32:57 GMT'); | ||
e.gist.should.eql('sent'); | ||
e.timestamp.should.eql('Tue, 18 Nov 2014 12:32:57 GMT'); | ||
e.content.should.eql({ 'more': 'data' }); | ||
@@ -68,15 +70,15 @@ }); | ||
return client.get('domain.com', { page: 'mypageid' }).then(function(events) { | ||
return client.get('domain.com', { page: 'mypageid' }).then(function(data) { | ||
var e; | ||
e = events[0]; | ||
e = data.items[0]; | ||
e.type.should.eql('accepted'); | ||
e.summary.should.eql('got it'); | ||
e.timestamp.toUTCString().should.eql('Wed, 19 Nov 2014 18:32:57 GMT'); | ||
e.gist.should.eql('got it'); | ||
e.timestamp.should.eql('Wed, 19 Nov 2014 18:32:57 GMT'); | ||
e.content.should.eql({ 'more': 'data' }); | ||
e = events[1]; | ||
e = data.items[1]; | ||
e.type.should.eql('opened'); | ||
e.summary.should.eql('sent'); | ||
e.timestamp.toUTCString().should.eql('Tue, 18 Nov 2014 12:32:57 GMT'); | ||
e.gist.should.eql('sent'); | ||
e.timestamp.should.eql('Tue, 18 Nov 2014 12:32:57 GMT'); | ||
e.content.should.eql({ 'more': 'data' }); | ||
@@ -89,18 +91,18 @@ }); | ||
return client.get('domain.com').then(function(events) { | ||
return client.get('domain.com').then(function(data) { | ||
var page; | ||
page = events.pages.first; | ||
page = data.pages.first; | ||
page.url.should.eql('https://api.mailgun.net/v2/mailgun.com/events/W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImEiOiBmYWxzZSwgImIiOiAiMjAxNC0xMS0xOVQyMDo1NjoyMS42NDAyMTErMDA6MDAifSwgWyJ4IiwgImUiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCBudWxsLCBbWyJkb21haW4ubmFtZSIsICJtYWlsZ3VuLmNvbSJdLCBbImFjY291bnQuaWQiLCAiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxIl1dXQ=='); | ||
page.number.should.eql('W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImEiOiBmYWxzZSwgImIiOiAiMjAxNC0xMS0xOVQyMDo1NjoyMS42NDAyMTErMDA6MDAifSwgWyJ4IiwgImUiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCBudWxsLCBbWyJkb21haW4ubmFtZSIsICJtYWlsZ3VuLmNvbSJdLCBbImFjY291bnQuaWQiLCAiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxIl1dXQ=='); | ||
page = events.pages.last; | ||
page = data.pages.last; | ||
page.url.should.eql('https://api.mailgun.net/v2/mailgun.com/events/W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImIiOiAiMTk3MC0wMS0wMVQwMDowMDowMCswMDowMCIsICJlIjogIjIwMTQtMTEtMTlUMjA6NTY6MjEuNjQwMjEyKzAwOjAwIn0sIFsieCIsICJlIiwgInAiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCBudWxsLCBbWyJkb21haW4ubmFtZSIsICJtYWlsZ3VuLmNvbSJdLCBbImFjY291bnQuaWQiLCAiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxIl1dXQ=='); | ||
page.number.should.eql('W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImIiOiAiMTk3MC0wMS0wMVQwMDowMDowMCswMDowMCIsICJlIjogIjIwMTQtMTEtMTlUMjA6NTY6MjEuNjQwMjEyKzAwOjAwIn0sIFsieCIsICJlIiwgInAiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCBudWxsLCBbWyJkb21haW4ubmFtZSIsICJtYWlsZ3VuLmNvbSJdLCBbImFjY291bnQuaWQiLCAiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxIl1dXQ=='); | ||
page = events.pages.next; | ||
page = data.pages.next; | ||
page.url.should.eql('https://api.mailgun.net/v2/mailgun.com/events/W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImEiOiBmYWxzZSwgImIiOiAiMjAxNC0xMS0xNFQyMzowODowNC4yODUwMDArMDA6MDAifSwgWyJ4IiwgImUiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCAibWVzc2FnZSN5NXhkN0pqc1FadVlRQzUyenUyUGlnIiwgW1siZG9tYWluLm5hbWUiLCAibWFpbGd1bi5jb20iXSwgWyJhY2NvdW50LmlkIiwgIjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMSJdXV0='); | ||
page.number.should.eql('W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImEiOiBmYWxzZSwgImIiOiAiMjAxNC0xMS0xNFQyMzowODowNC4yODUwMDArMDA6MDAifSwgWyJ4IiwgImUiLCAiZiJdLCBudWxsLCBbWyJzZXZlcml0eSIsICJOT1QgaW50ZXJuYWwiXV0sIDI1LCAibWVzc2FnZSN5NXhkN0pqc1FadVlRQzUyenUyUGlnIiwgW1siZG9tYWluLm5hbWUiLCAibWFpbGd1bi5jb20iXSwgWyJhY2NvdW50LmlkIiwgIjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMSJdXV0='); | ||
page = events.pages.previous; | ||
page = data.pages.previous; | ||
page.url.should.eql('https://api.mailgun.net/v2/mailgun.com/events/W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImIiOiAiMjAxNC0xMS0xOVQxODozMjo1Ny4wMTkwMDArMDA6MDAiLCAiZSI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MTIxMSswMDowMCJ9LCBbIngiLCAiZSIsICJwIiwgImYiXSwgbnVsbCwgW1sic2V2ZXJpdHkiLCAiTk9UIGludGVybmFsIl1dLCAyNSwgIm1lc3NhZ2Ujc3UxSk93N1dRX0dQXzVlRHg5am1tUSIsIFtbImRvbWFpbi5uYW1lIiwgIm1haWxndW4uY29tIl0sIFsiYWNjb3VudC5pZCIsICIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiXV1d'); | ||
@@ -107,0 +109,0 @@ page.number.should.eql('W3siYSI6IGZhbHNlLCAiYiI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MDIxMSswMDowMCJ9LCB7ImIiOiAiMjAxNC0xMS0xOVQxODozMjo1Ny4wMTkwMDArMDA6MDAiLCAiZSI6ICIyMDE0LTExLTE5VDIwOjU2OjIxLjY0MTIxMSswMDowMCJ9LCBbIngiLCAiZSIsICJwIiwgImYiXSwgbnVsbCwgW1sic2V2ZXJpdHkiLCAiTk9UIGludGVybmFsIl1dLCAyNSwgIm1lc3NhZ2Ujc3UxSk93N1dRX0dQXzVlRHg5am1tUSIsIFtbImRvbWFpbi5uYW1lIiwgIm1haWxndW4uY29tIl0sIFsiYWNjb3VudC5pZCIsICIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiXV1d'); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2633591
16104
1157
12
8