Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ntegral/sendgrid-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ntegral/sendgrid-client - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

dist/common/common.resource.d.ts

@@ -0,1 +1,2 @@

import { ClientResponse } from "@sendgrid/client/src/response";
export declare namespace resource {

@@ -102,4 +103,4 @@ namespace Mail {

}
function send(model: MailData): Promise<[import("@sendgrid/client/src/response").ClientResponse, any]>;
function send(model: MailData): Promise<[ClientResponse, any]>;
}
}

@@ -15,3 +15,12 @@ "use strict";

};
return client.request(data);
return new Promise((resolve, reject) => {
client.request(data, (err, resp) => {
if (err) {
reject(err);
}
else {
resolve(resp);
}
});
});
}

@@ -18,0 +27,0 @@ Mail.send = send;

import client = require("@sendgrid/client");
import {ResponseError} from "@sendgrid/helpers/classes";
import { ClientRequest } from "@sendgrid/client/src/request";
import { ClientResponse } from "@sendgrid/client/src/response";

@@ -222,3 +224,3 @@ export namespace resource {

export function send(model: MailData) {
export function send(model: MailData): Promise<[ClientResponse,any]> {
const data: ClientRequest = {

@@ -230,5 +232,22 @@ method: "POST",

return client.request(data);
/*
client.request(data).then((result:ClientResponse) => {
resolve(result);
}).catch((err) => {
reject(err);
})
*/
return new Promise((resolve, reject) => {
client.request(data, (err:ResponseError, resp: [ClientResponse,any])=> {
if (err) {
reject(err);
}
else {
resolve(resp);
}
})
});
}
}
}

@@ -10,3 +10,3 @@ {

"name": "@ntegral/sendgrid-client",
"version": "1.0.0",
"version": "1.0.1",
"description": "Client for the SendGrid v3 Web API",

@@ -13,0 +13,0 @@ "main": "./dist/index.js",

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