@amohamud23/notihub 1.0.3 → 1.0.5
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/package.json +1 -1
- package/types/types.d.ts +76 -0
- package/src/types/index.d.ts +0 -74
package/package.json
CHANGED
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
declare module "notihub" {
|
|
2
|
+
// ----------------- Request Types ---------------------
|
|
3
|
+
interface CreateNotiRequestBody {
|
|
4
|
+
subscriptionId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface CreateSubscriptionRequestBody {
|
|
12
|
+
subscriptionId: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface CreateUserRequestBody {
|
|
17
|
+
name: string;
|
|
18
|
+
email: string;
|
|
19
|
+
token: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// ----------------- NotiHub Types ---------------------
|
|
23
|
+
|
|
24
|
+
export interface INotiHubCustomerMinified {
|
|
25
|
+
_id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
img: INotiHubImage;
|
|
28
|
+
username: string;
|
|
29
|
+
}
|
|
30
|
+
export interface INotiHubCustomer {
|
|
31
|
+
_id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
minified: INotiHubCustomerMinified;
|
|
34
|
+
verified: boolean;
|
|
35
|
+
paid: boolean;
|
|
36
|
+
confirmed: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface INotiHubNotification {
|
|
40
|
+
_id?: string;
|
|
41
|
+
title: string;
|
|
42
|
+
message: string;
|
|
43
|
+
type: string;
|
|
44
|
+
entityId: string;
|
|
45
|
+
minified: INotiHubCustomerMinified;
|
|
46
|
+
body: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface INotiHubSubscription {
|
|
50
|
+
_id?: string;
|
|
51
|
+
subscriptionId: string;
|
|
52
|
+
entity: IEntity;
|
|
53
|
+
user: IUser;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface INotiHubUser {
|
|
57
|
+
_id?: string;
|
|
58
|
+
pushToken: string;
|
|
59
|
+
name: string;
|
|
60
|
+
email: string;
|
|
61
|
+
subscriptions: number;
|
|
62
|
+
events: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface INotiHubImage {
|
|
66
|
+
bucket: string;
|
|
67
|
+
key: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface INotiHubStats {
|
|
71
|
+
subscription: number;
|
|
72
|
+
notifications: number;
|
|
73
|
+
impressions: number;
|
|
74
|
+
views: number;
|
|
75
|
+
}
|
|
76
|
+
}
|
package/src/types/index.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// ----------------- Request Types ---------------------
|
|
2
|
-
interface CreateNotiRequestBody {
|
|
3
|
-
subscriptionId: string;
|
|
4
|
-
userId: string;
|
|
5
|
-
title: string;
|
|
6
|
-
message: string;
|
|
7
|
-
type: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface CreateSubscriptionRequestBody {
|
|
11
|
-
subscriptionId: string;
|
|
12
|
-
type: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface CreateUserRequestBody {
|
|
16
|
-
name: string;
|
|
17
|
-
email: string;
|
|
18
|
-
token: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// ----------------- NotiHub Types ---------------------
|
|
22
|
-
|
|
23
|
-
export interface INotiHubCustomerMinified {
|
|
24
|
-
_id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
img: INotiHubImage;
|
|
27
|
-
username: string;
|
|
28
|
-
}
|
|
29
|
-
export interface INotiHubCustomer {
|
|
30
|
-
_id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
minified: INotiHubCustomerMinified;
|
|
33
|
-
verified: boolean;
|
|
34
|
-
paid: boolean;
|
|
35
|
-
confirmed: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface INotiHubNotification {
|
|
39
|
-
_id?: string;
|
|
40
|
-
title: string;
|
|
41
|
-
message: string;
|
|
42
|
-
type: string;
|
|
43
|
-
entityId: string;
|
|
44
|
-
minified: INotiHubCustomerMinified;
|
|
45
|
-
body: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface INotiHubSubscription {
|
|
49
|
-
_id?: string;
|
|
50
|
-
subscriptionId: string;
|
|
51
|
-
entity: IEntity;
|
|
52
|
-
user: IUser;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface INotiHubUser {
|
|
56
|
-
_id?: string;
|
|
57
|
-
pushToken: string;
|
|
58
|
-
name: string;
|
|
59
|
-
email: string;
|
|
60
|
-
subscriptions: number;
|
|
61
|
-
events: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface INotiHubImage {
|
|
65
|
-
bucket: string;
|
|
66
|
-
key: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface INotiHubStats {
|
|
70
|
-
subscription: number;
|
|
71
|
-
notifications: number;
|
|
72
|
-
impressions: number;
|
|
73
|
-
views: number;
|
|
74
|
-
}
|