@trycourier/courier 3.6.0 → 3.7.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.
package/CHANGELOG.md CHANGED
@@ -5,9 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## [v3.7.0] - 2022-03-11
9
+
10
+ - adds additional types for the tags property (`message.tags`)
11
+ - adds support for searching message by tags
12
+
8
13
  ## [v3.6.0] - 2022-02-10
9
14
 
10
- - adds additional type's for the recipient property (`message.to`)
15
+ - adds additional types for the recipient property (`message.to`)
11
16
 
12
17
  ## [v3.5.0] - 2022-02-10
13
18
 
package/lib/client.js CHANGED
@@ -97,8 +97,9 @@ var getMessages = function (options) {
97
97
  messageId: params === null || params === void 0 ? void 0 : params.messageId,
98
98
  notification: params === null || params === void 0 ? void 0 : params.notificationId,
99
99
  recipient: params === null || params === void 0 ? void 0 : params.recipientId,
100
- status: params === null || params === void 0 ? void 0 : params.status
101
- }
100
+ status: params === null || params === void 0 ? void 0 : params.status,
101
+ tags: params === null || params === void 0 ? void 0 : params.tags,
102
+ },
102
103
  })];
103
104
  case 1:
104
105
  res = _a.sent();
@@ -316,7 +316,10 @@ export interface RoutingStrategyProvider<T = Record<string, any>> {
316
316
  config?: T;
317
317
  if?: string;
318
318
  }
319
- export interface ContentMessageMetadata {
319
+ export interface BaseMessageMetadata {
320
+ tags?: [string?, string?, string?, string?, string?, string?, string?, string?, string?];
321
+ }
322
+ export interface ContentMessageMetadata extends BaseMessageMetadata {
320
323
  event?: string;
321
324
  }
322
325
  export interface ContentMessage extends BaseMessage {
@@ -325,6 +328,7 @@ export interface ContentMessage extends BaseMessage {
325
328
  }
326
329
  export interface TemplateMessage extends BaseMessage {
327
330
  brand?: string;
331
+ metadata?: BaseMessageMetadata;
328
332
  template: string;
329
333
  }
330
334
  export declare type Message = ContentMessage | TemplateMessage;
package/lib/types.d.ts CHANGED
@@ -96,6 +96,7 @@ export interface ICourierMessagesGetParameters {
96
96
  notificationId?: string;
97
97
  recipientId?: string;
98
98
  status?: string | string[];
99
+ tags?: string | string[];
99
100
  }
100
101
  export interface ICourierMessagesGetResponse {
101
102
  paging: ICourierPaging;
@@ -107,6 +108,7 @@ export interface ICourierMessagesGetResponse {
107
108
  recipient: string;
108
109
  sent?: number;
109
110
  status: string;
111
+ tags?: string[];
110
112
  }>;
111
113
  }
112
114
  export interface ICourierMessageGetResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier",
3
- "version": "3.6.0",
3
+ "version": "3.7.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",
@@ -33,4 +33,4 @@
33
33
  "dependencies": {
34
34
  "axios": "^0.21.1"
35
35
  }
36
- }
36
+ }