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

@trycourier/courier

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trycourier/courier - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [v1.4.0] - 2020-06-29
### Added
- Support /messages/:messageId via client.getMessage(:messageId) @rileylnapier
## [v1.3.0] - 2020-03-10

@@ -8,0 +14,0 @@

@@ -59,2 +59,15 @@ "use strict";

};
var getMessage = function (options) {
return function (messageId) { return __awaiter(void 0, void 0, void 0, function () {
var res;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, options.httpClient.get("/messages/" + messageId)];
case 1:
res = _a.sent();
return [2 /*return*/, res.data];
}
});
}); };
};
var replaceProfile = function (options) {

@@ -105,2 +118,3 @@ return function (params) { return __awaiter(void 0, void 0, void 0, function () {

return {
getMessage: getMessage(options),
getProfile: getProfile(options),

@@ -107,0 +121,0 @@ mergeProfile: mergeProfile(options),

@@ -48,2 +48,23 @@ export declare type HttpMethodClient = <T>(url: string, body?: object) => Promise<{

}
export interface ICourierMessageGetResponse {
enqueued?: number;
event?: string;
id: string;
notification?: string;
providers?: Array<{
channel: {
name: string;
template: string;
};
provider: string;
reference: {
"x-message-id": string;
};
sent: number;
status: string;
}>;
recipient: string;
sent?: number;
status: string;
}
export declare type ICourierChannelClassification = "direct_message" | "email" | "push" | "webhook";

@@ -55,2 +76,3 @@ export interface ICourierProfilePreferences {

send: (params: ICourierSendParameters) => Promise<ICourierSendResponse>;
getMessage: (messageId: string) => Promise<ICourierMessageGetResponse>;
replaceProfile: (params: ICourierProfilePutParameters) => Promise<ICourierProfilePutResponse>;

@@ -57,0 +79,0 @@ mergeProfile: (params: ICourierProfilePostParameters) => Promise<ICourierProfilePostResponse>;

4

package.json
{
"name": "@trycourier/courier",
"version": "1.3.0",
"version": "1.4.0",
"description": "A node.js module for communicating with the Courier REST API.",

@@ -36,2 +36,2 @@ "main": "lib/index.js",

}
}
}

@@ -58,2 +58,6 @@ # `@trycourier/courier`

// Example: get a message status
const messageStatus = await courier.getMessage(messageId);
console.log(messageStatus);
// Example: replace a recipient's profile

@@ -60,0 +64,0 @@ const { status: replaceStatus } = await courier.replaceProfile({

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