shred-api-client 1.12.1 → 1.12.2

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.
@@ -44,7 +44,10 @@ type History = {
44
44
  success: number;
45
45
  error: number;
46
46
  };
47
- errorList?: string[];
47
+ errorList?: {
48
+ token: string;
49
+ error: string;
50
+ }[];
48
51
  executionTimeDuration?: number;
49
52
  };
50
53
  type RecurrenceRule = {
@@ -73,10 +76,22 @@ type Trigger = {
73
76
  createdAt?: number;
74
77
  modified?: number;
75
78
  };
79
+ type NotificationItem = {
80
+ id: string;
81
+ userId: string;
82
+ triggerId?: string;
83
+ title: string;
84
+ body: string;
85
+ status: "failed" | "delivered";
86
+ deliveredAt: number;
87
+ openedAt?: number;
88
+ metadata: Record<string, string | number>;
89
+ error?: string;
90
+ };
76
91
  type NotificationDetail = {
77
92
  title: string;
78
93
  body: string;
79
94
  userToken?: string;
80
95
  metadata?: Record<string, any>;
81
96
  };
82
- export { NotificationSchema, NotificationEndpoints, NotificationDetail, RecurrenceRule, Trigger, Criteria, History, };
97
+ export { NotificationItem, NotificationSchema, NotificationEndpoints, NotificationDetail, RecurrenceRule, Trigger, Criteria, History, };
@@ -1,5 +1,5 @@
1
1
  import { Product as TProduct, Subscription as TSubscription, Charge as TCharge } from "./model/Subscription.schema";
2
- import { Trigger as TTrigger, Criteria as TCriteria, NotificationDetail as TNContent, RecurrenceRule as TRRule, History as THistory } from "./model/Notification.schema";
2
+ import { Trigger as TTrigger, Criteria as TCriteria, NotificationDetail as TNContent, RecurrenceRule as TRRule, NotificationItem as TNotificaitonItem, History as THistory } from "./model/Notification.schema";
3
3
  import { APIResponse } from "./model/Api";
4
4
  import { System as TSystem, User as TUser, Preferences as UserPreferences, Role as TRole } from "./model/User.schema";
5
5
  import { Email as TEmail } from "./model/Email.schema";
@@ -69,6 +69,7 @@ export declare namespace Notification {
69
69
  type Trigger = TTrigger;
70
70
  type Criteria = TCriteria;
71
71
  type History = THistory;
72
+ type Item = TNotificaitonItem;
72
73
  type Detail = TNContent;
73
74
  }
74
75
  export declare namespace User {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shred-api-client",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "API Client for Shred",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",