shred-api-client 1.10.4 → 1.10.6
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/dist/model/PushNotification.schema.d.ts +12 -2
- package/dist/namespace.d.ts +13 -1
- package/dist/namespace.js +12 -0
- package/package.json +1 -1
|
@@ -13,6 +13,12 @@ type NotificationCriteria = {
|
|
|
13
13
|
type: Notification.CriteriaType;
|
|
14
14
|
params: Record<string, any>;
|
|
15
15
|
};
|
|
16
|
+
type NotificationHistory = {
|
|
17
|
+
executedAt: number;
|
|
18
|
+
status: "success" | "failed" | "info" | "warn";
|
|
19
|
+
notifiedUsers?: number;
|
|
20
|
+
executionTimeDuration?: number;
|
|
21
|
+
};
|
|
16
22
|
type NotificationTrigger = {
|
|
17
23
|
id: string;
|
|
18
24
|
title: string;
|
|
@@ -25,8 +31,12 @@ type NotificationTrigger = {
|
|
|
25
31
|
title: string;
|
|
26
32
|
body: string;
|
|
27
33
|
};
|
|
28
|
-
|
|
34
|
+
history?: NotificationHistory[];
|
|
35
|
+
status: Notification.Status;
|
|
36
|
+
isRecurring: boolean;
|
|
37
|
+
executionDate: number;
|
|
29
38
|
criteria: NotificationCriteria;
|
|
39
|
+
nextExecution?: number;
|
|
30
40
|
createdAt?: number;
|
|
31
41
|
modified?: number;
|
|
32
42
|
};
|
|
@@ -36,4 +46,4 @@ type PushNotification = {
|
|
|
36
46
|
userToken: string;
|
|
37
47
|
metadata: any;
|
|
38
48
|
};
|
|
39
|
-
export { PushNotificationSchema, PushNotificationEndpoints, PushNotification, NotificationTrigger, NotificationCriteria, };
|
|
49
|
+
export { PushNotificationSchema, PushNotificationEndpoints, PushNotification, NotificationTrigger, NotificationCriteria, NotificationHistory, };
|
package/dist/namespace.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Product as TProduct, Subscription as TSubscription, Charge as TCharge } from "./model/Subscription.schema";
|
|
2
|
-
import { NotificationTrigger as TTrigger, NotificationCriteria as TCriteria } from "./model/PushNotification.schema";
|
|
2
|
+
import { NotificationTrigger as TTrigger, NotificationCriteria as TCriteria, NotificationHistory as THistory } from "./model/PushNotification.schema";
|
|
3
3
|
import { System as TSystem, User as TUser, Preferences as UserPreferences, Role as TRole } from "./model/User.schema";
|
|
4
4
|
import { Email as TEmail } from "./model/Email.schema";
|
|
5
5
|
import { Asset as TAsset } from "./model/Asset.schema";
|
|
@@ -28,6 +28,7 @@ export declare namespace Shred {
|
|
|
28
28
|
export declare namespace Notification {
|
|
29
29
|
enum CriteriaType {
|
|
30
30
|
NoLogin = "noLogin",
|
|
31
|
+
AllUsers = "allUsers",
|
|
31
32
|
NoProjects = "noProjects",
|
|
32
33
|
InactiveUsers = "inactiveUsers",
|
|
33
34
|
NoSubscription = "noSubscription"
|
|
@@ -36,8 +37,19 @@ export declare namespace Notification {
|
|
|
36
37
|
Push = "push",
|
|
37
38
|
Email = "email"
|
|
38
39
|
}
|
|
40
|
+
enum Status {
|
|
41
|
+
SCHEDULED = "scheduled",
|
|
42
|
+
RUNNING = "running",
|
|
43
|
+
COMPLETED = "completed",
|
|
44
|
+
FAILED = "failed",
|
|
45
|
+
PAUSED = "paused",
|
|
46
|
+
CANCELLED = "cancelled",
|
|
47
|
+
ACTIVE = "active",
|
|
48
|
+
EXPIRED = "expired"
|
|
49
|
+
}
|
|
39
50
|
type Trigger = TTrigger;
|
|
40
51
|
type Criteria = TCriteria;
|
|
52
|
+
type History = THistory;
|
|
41
53
|
}
|
|
42
54
|
export declare namespace User {
|
|
43
55
|
type Preferences = UserPreferences;
|
package/dist/namespace.js
CHANGED
|
@@ -6,6 +6,7 @@ var Notification;
|
|
|
6
6
|
let CriteriaType;
|
|
7
7
|
(function (CriteriaType) {
|
|
8
8
|
CriteriaType["NoLogin"] = "noLogin";
|
|
9
|
+
CriteriaType["AllUsers"] = "allUsers";
|
|
9
10
|
CriteriaType["NoProjects"] = "noProjects";
|
|
10
11
|
CriteriaType["InactiveUsers"] = "inactiveUsers";
|
|
11
12
|
CriteriaType["NoSubscription"] = "noSubscription";
|
|
@@ -15,4 +16,15 @@ var Notification;
|
|
|
15
16
|
TransportType["Push"] = "push";
|
|
16
17
|
TransportType["Email"] = "email";
|
|
17
18
|
})(TransportType = Notification.TransportType || (Notification.TransportType = {}));
|
|
19
|
+
let Status;
|
|
20
|
+
(function (Status) {
|
|
21
|
+
Status["SCHEDULED"] = "scheduled";
|
|
22
|
+
Status["RUNNING"] = "running";
|
|
23
|
+
Status["COMPLETED"] = "completed";
|
|
24
|
+
Status["FAILED"] = "failed";
|
|
25
|
+
Status["PAUSED"] = "paused";
|
|
26
|
+
Status["CANCELLED"] = "cancelled";
|
|
27
|
+
Status["ACTIVE"] = "active";
|
|
28
|
+
Status["EXPIRED"] = "expired";
|
|
29
|
+
})(Status = Notification.Status || (Notification.Status = {}));
|
|
18
30
|
})(Notification || (exports.Notification = Notification = {}));
|