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

@trycourier/courier

Package Overview
Dependencies
Maintainers
2
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 2.7.0 to 2.8.0

7

CHANGELOG.md

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

## [v2.8.0] - 2021-10-29
- adds GET /messages/{messageId}/output API
## [v2.7.0] - 2021-10-21

@@ -173,3 +177,4 @@

[unreleased]: https://github.com/trycourier/courier-node/compare/v2.7.0...HEAD
[unreleased]: https://github.com/trycourier/courier-node/compare/v2.8.0...HEAD
[v2.8.0]: https://github.com/trycourier/courier-node/compare/v2.7.0...v2.8.0
[v2.7.0]: https://github.com/trycourier/courier-node/compare/v2.6.0...v2.7.0

@@ -176,0 +181,0 @@ [v2.6.0]: https://github.com/trycourier/courier-node/compare/v2.4.0...v2.6.0

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

};
var getMessageOutput = 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 + "/output")];
case 1:
res = _a.sent();
return [2 /*return*/, res.data];
}
});
}); };
};
var getMessages = function (options) {

@@ -133,2 +146,3 @@ return function (params) { return __awaiter(void 0, void 0, void 0, function () {

getMessageHistory: getMessageHistory(options),
getMessageOutput: getMessageOutput(options),
getMessages: getMessages(options),

@@ -135,0 +149,0 @@ getProfile: profile_1.getProfile(options),

@@ -191,2 +191,17 @@ import { AxiosRequestConfig } from "axios";

}
export interface IApiMessageOutputItem {
channel: string;
channel_id: string;
content: {
html?: string;
title?: string;
blocks?: any[];
body?: string;
subject?: string;
text?: string;
};
}
export interface ICourierMessageGetOutputResponse {
results: IApiMessageOutputItem[];
}
export interface ICourierProfileDeleteParameters {

@@ -254,2 +269,3 @@ recipientId: string;

getMessageHistory: (messageId: string) => Promise<ICourierMessageGetHistoryResponse>;
getMessageOutput: (messageId: string) => Promise<ICourierMessageGetOutputResponse>;
getMessages: (params?: ICourierMessagesGetParameters) => Promise<ICourierMessagesGetResponse>;

@@ -256,0 +272,0 @@ getProfile: (params: ICourierProfileGetParameters) => Promise<ICourierProfileGetResponse>;

2

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

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -87,2 +87,6 @@ [![Courier: Your Complete Communication Stack](https://marketing-assets-public.s3.us-west-1.amazonaws.com/github_nodejs.png)](https://courier.com)

// Example: get a message output
const { results } = await courier.getMessageOutput(messageId);
console.log(results);
// Example: get all messages

@@ -89,0 +93,0 @@ const { paging, results } = await courier.getMessages();

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