@trycourier/courier 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,7 +91,7 @@ var putAudience = function (options) {
91
91
  var response;
92
92
  return __generator(this, function (_a) {
93
93
  switch (_a.label) {
94
- case 0: return [4 /*yield*/, options.httpClient.put("/audiences/" + audience.id)];
94
+ case 0: return [4 /*yield*/, options.httpClient.put("/audiences/" + audience.id, audience)];
95
95
  case 1:
96
96
  response = _a.sent();
97
97
  return [2 /*return*/, response.data.audience];
@@ -1,9 +1,24 @@
1
1
  import { ICourierPaging } from "../types";
2
+ export declare type MessageRoutingMethod = "all" | "single";
3
+ export declare type MessageRoutingChannel = string | IMessageRouting;
4
+ export interface IMessageRouting {
5
+ method: MessageRoutingMethod;
6
+ channels: MessageRoutingChannel[];
7
+ }
2
8
  export interface ICourierNotificationListResponse {
3
9
  paging: ICourierPaging;
4
10
  results: Array<{
11
+ created_at: number;
5
12
  id: string;
13
+ routing: IMessageRouting;
14
+ tags: {
15
+ data: Array<{
16
+ id: string;
17
+ name: string;
18
+ }>;
19
+ };
6
20
  title: string;
21
+ updated_at: number;
7
22
  }>;
8
23
  }
9
24
  export interface ICourierNotificationListParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "A node.js module for communicating with the Courier REST API.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",