@trycourier/courier
Advanced tools
Comparing version 3.2.1 to 3.3.0
@@ -8,2 +8,6 @@ # Change Log | ||
## [v3.3.0] - 2022-01-25 | ||
- adds support for bulk processing endpoints | ||
## [v3.2.1] - 2022-01-13 | ||
@@ -193,3 +197,4 @@ | ||
[unreleased]: https://github.com/trycourier/courier-node/compare/v3.2.1...HEAD | ||
[unreleased]: https://github.com/trycourier/courier-node/compare/v3.3.0...HEAD | ||
[v3.3.0]: https://github.com/trycourier/courier-node/compare/v3.2.1...v3.3.0 | ||
[v3.2.1]: https://github.com/trycourier/courier-node/compare/v3.2.0...v3.2.1 | ||
@@ -196,0 +201,0 @@ [v3.2.0]: https://github.com/trycourier/courier-node/compare/v3.1.0...v3.2.0 |
@@ -42,2 +42,3 @@ "use strict"; | ||
var brands_1 = require("./brands"); | ||
var bulk_1 = require("./bulk"); | ||
var lists_1 = require("./lists"); | ||
@@ -145,2 +146,3 @@ var notifications_1 = require("./notifications"); | ||
automations: automations_1.automations(options), | ||
bulk: bulk_1.bulk(options), | ||
createBrand: brands_1.createBrand(options), | ||
@@ -147,0 +149,0 @@ deleteBrand: brands_1.deleteBrand(options), |
import { AxiosRequestConfig } from "axios"; | ||
import { ICourierClientAutomations } from "./automations/types"; | ||
import { ICourierClientBulk } from "./bulk/types"; | ||
import { ICourierClientLists, ICourierList, ICourierRecipientSubscriptionsResponse } from "./lists/types"; | ||
@@ -276,2 +277,3 @@ import { ICourierClientNotifications } from "./notifications/types"; | ||
automations: ICourierClientAutomations; | ||
bulk: ICourierClientBulk; | ||
createBrand: (params: ICourierBrandParameters, config?: ICourierBrandPostConfig) => Promise<ICourierBrand>; | ||
@@ -278,0 +280,0 @@ deleteBrand: (brandId: string) => Promise<void>; |
{ | ||
"name": "@trycourier/courier", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "A node.js module for communicating with the Courier REST API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -380,2 +380,41 @@ [](https://courier.com) | ||
await courier.notifications.cancelSubmission("notification1", "submission1"); | ||
// Bulk Processing | ||
// Example: create a job | ||
const response = await courier.bulk.createJob({ | ||
message: { | ||
event: "RR4NDQ7NZ24A8TKPWVBEDGE15E9A", | ||
}, | ||
}); | ||
console.log(response); | ||
// Example: get a job | ||
const response = await courier.bulk.getJob({ | ||
jobId: "1-61efe386-6ff57552409e311b7a1f371f", | ||
}); | ||
console.log(response); | ||
// Example: Ingest users in a job | ||
const response = await courier.bulk.ingestUsers({ | ||
jobId: "1-61efe386-6ff57552409e311b7a1f371f", | ||
users: [ | ||
{ | ||
profile: { | ||
email: "tejas@courier.com", | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
// Example: Run a job | ||
await courier.bulk.runJob({ | ||
jobId: "1-61efe386-6ff57552409e311b7a1f371f", | ||
}); | ||
// Example: Get user details in a job | ||
const response = await courier.bulk.getJobUsers({ | ||
jobId: "1-61efe386-6ff57552409e311b7a1f371f", | ||
}); | ||
console.log(response); | ||
} | ||
@@ -382,0 +421,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
104731
34
1875
465
0