shred-api-client 1.10.9 → 1.10.11
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Environment from "../model/Env";
|
|
2
|
-
import { NotificationSchema,
|
|
2
|
+
import { NotificationSchema, NotificationDetail } from "../model/Notification.schema";
|
|
3
3
|
import Context from "../model/Context";
|
|
4
4
|
declare class NotificationAPI implements NotificationSchema {
|
|
5
5
|
private env;
|
|
6
6
|
private clientHTTP;
|
|
7
7
|
constructor(env: Environment);
|
|
8
|
-
push(ctx: Context, notification:
|
|
8
|
+
push(ctx: Context, notification: NotificationDetail): Promise<boolean>;
|
|
9
9
|
}
|
|
10
10
|
export default NotificationAPI;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Context from "./Context";
|
|
2
2
|
import { Notification } from "./../namespace";
|
|
3
3
|
interface NotificationSchema {
|
|
4
|
-
push: (context: Context, notification:
|
|
4
|
+
push: (context: Context, notification: NotificationDetail) => Promise<boolean>;
|
|
5
5
|
}
|
|
6
6
|
declare const NotificationEndpoints: {
|
|
7
7
|
Push: {
|
|
@@ -14,9 +14,16 @@ type Criteria = {
|
|
|
14
14
|
params: Record<string, any>;
|
|
15
15
|
};
|
|
16
16
|
type History = {
|
|
17
|
+
batchId: string;
|
|
17
18
|
executedAt: number;
|
|
19
|
+
timezone: string;
|
|
18
20
|
status: "success" | "failed" | "info" | "warn";
|
|
19
|
-
|
|
21
|
+
users: {
|
|
22
|
+
total: number;
|
|
23
|
+
success: number;
|
|
24
|
+
error: number;
|
|
25
|
+
};
|
|
26
|
+
errorList?: string[];
|
|
20
27
|
executionTimeDuration?: number;
|
|
21
28
|
};
|
|
22
29
|
type Trigger = {
|
|
@@ -24,7 +31,7 @@ type Trigger = {
|
|
|
24
31
|
title: string;
|
|
25
32
|
description: string;
|
|
26
33
|
transportType: Notification.TransportType[];
|
|
27
|
-
notification:
|
|
34
|
+
notification: NotificationDetail;
|
|
28
35
|
executionTime: string;
|
|
29
36
|
repeatDays: Notification.WeekDay[];
|
|
30
37
|
history?: History[];
|
|
@@ -36,10 +43,10 @@ type Trigger = {
|
|
|
36
43
|
createdAt?: number;
|
|
37
44
|
modified?: number;
|
|
38
45
|
};
|
|
39
|
-
type
|
|
46
|
+
type NotificationDetail = {
|
|
40
47
|
title: string;
|
|
41
48
|
body: string;
|
|
42
49
|
userToken?: string;
|
|
43
50
|
metadata?: any;
|
|
44
51
|
};
|
|
45
|
-
export { NotificationSchema, NotificationEndpoints,
|
|
52
|
+
export { NotificationSchema, NotificationEndpoints, NotificationDetail, Trigger, Criteria, History, };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const namespace_1 = require("./../namespace");
|
|
5
|
-
Object.defineProperty(exports, "Notification", { enumerable: true, get: function () { return namespace_1.Notification; } });
|
|
3
|
+
exports.NotificationEndpoints = void 0;
|
|
6
4
|
const NotificationEndpoints = {
|
|
7
5
|
Push: {
|
|
8
6
|
uri: "/notifications/push/",
|
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 { Trigger as TTrigger, Criteria as TCriteria,
|
|
2
|
+
import { Trigger as TTrigger, Criteria as TCriteria, NotificationDetail as TNContent, History as THistory } from "./model/Notification.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";
|
|
@@ -59,7 +59,7 @@ export declare namespace Notification {
|
|
|
59
59
|
type Trigger = TTrigger;
|
|
60
60
|
type Criteria = TCriteria;
|
|
61
61
|
type History = THistory;
|
|
62
|
-
type
|
|
62
|
+
type Detail = TNContent;
|
|
63
63
|
}
|
|
64
64
|
export declare namespace User {
|
|
65
65
|
type Preferences = UserPreferences;
|