@trycourier/courier
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -8,3 +8,8 @@ # Change Log | ||
## [v2.2.0] - 2021-04-07 | ||
- adds automations API | ||
## [v2.1.0] - 2021-03-15 | ||
- adds support to add more recipients to a list subscription (#40) | ||
@@ -149,4 +154,5 @@ - adds support to delete all the lists subscriptions for a recipient (#39) | ||
[unreleased]: https://github.com/trycourier/courier-node/compare/v2.1.0...HEAD | ||
[v2.3.1]: https://github.com/trycourier/courier-node/compare/v2.0.0...v2.1.0 | ||
[unreleased]: https://github.com/trycourier/courier-node/compare/v2.2.0...HEAD | ||
[v2.2.0]: https://github.com/trycourier/courier-node/compare/v2.1.0...v2.2.0 | ||
[v2.1.0]: https://github.com/trycourier/courier-node/compare/v2.0.0...v2.1.0 | ||
[v2.0.0]: https://github.com/trycourier/courier-node/compare/v1.7.3...v2.0.0 | ||
@@ -153,0 +159,0 @@ [v1.7.3]: https://github.com/trycourier/courier-node/compare/v1.7.2...v1.7.3 |
@@ -40,2 +40,3 @@ "use strict"; | ||
exports.client = void 0; | ||
var automations_1 = require("./automations"); | ||
var brands_1 = require("./brands"); | ||
@@ -89,2 +90,3 @@ var lists_1 = require("./lists"); | ||
addRecipientToLists: profile_1.addRecipientToLists(options), | ||
automations: automations_1.automations(options), | ||
createBrand: brands_1.createBrand(options), | ||
@@ -91,0 +93,0 @@ deleteBrand: brands_1.deleteBrand(options), |
import { AxiosRequestConfig } from "axios"; | ||
import { ICourierClientAutomations } from "./automations/types"; | ||
import { ICourierClientLists, ICourierList } from "./lists/types"; | ||
@@ -151,2 +152,3 @@ import { ICourierClientPreferences, IRecipientPreferences } from "./preferences/types"; | ||
addRecipientToLists: (params: ICourierProfileListsPostParameters) => Promise<ICourierProfilePostResponse>; | ||
automations: ICourierClientAutomations; | ||
createBrand: (params: ICourierBrandParameters, config?: ICourierBrandPostConfig) => Promise<ICourierBrand>; | ||
@@ -153,0 +155,0 @@ deleteBrand: (brandId: string) => Promise<void>; |
{ | ||
"name": "@trycourier/courier", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A node.js module for communicating with the Courier REST API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -201,2 +201,39 @@ # `@trycourier/courier` | ||
console.log(profilePrefs); | ||
// Example: Automation Ad-Hoc Invoke | ||
const { runId } = await courier.automations.invokeAdHocAutomation({ | ||
automation: { | ||
cancelation_token: "I_AM_TOKEN", | ||
steps: [ | ||
{ | ||
action: "send", | ||
}, | ||
], | ||
}, | ||
brand: "BRAND_ID", | ||
data: { | ||
example: "EXAMPLE_DATA", | ||
}, | ||
profile: { | ||
email: "foo@bar.com", | ||
}, | ||
recipient: "RECIPIENT_ID", | ||
template: "TEMPLATE_NAME_OR_ID", | ||
}); | ||
console.log(runId); | ||
// Example: Automation Invoke Template | ||
const { runId } = await courier.automations.invokeAutomationTemplate({ | ||
templateId: "AUTOMATION_TEMPLATE_ID", | ||
brand: "BRAND_ID", | ||
data: { | ||
example: "EXAMPLE_DATA", | ||
}, | ||
profile: { | ||
email: "foo@bar.com", | ||
}, | ||
recipient: "RECIPIENT_ID", | ||
template: "TEMPLATE_NAME_OR_ID", | ||
}); | ||
console.log(runId); | ||
} | ||
@@ -203,0 +240,0 @@ |
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
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
68243
26
1157
284