beamsocial 0.12.0 → 0.13.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/lib/models/types/inbox.d.ts +37 -10
- package/lib/models/users.js +2 -2
- package/package.json +1 -1
|
@@ -1,29 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Profile } from './profiles.js';
|
|
2
|
+
export type PartialNotificationBase = {
|
|
2
3
|
id: string;
|
|
3
4
|
date: Date;
|
|
4
5
|
type: string;
|
|
5
6
|
isGroupable: boolean;
|
|
6
7
|
read: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type PartialNotificationSingle = PartialNotificationBase & {
|
|
7
10
|
author: string;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
11
|
+
};
|
|
12
|
+
export type NotificationBase = {
|
|
13
|
+
id: string;
|
|
14
|
+
date: Date;
|
|
15
|
+
type: string;
|
|
16
|
+
isGroupable: boolean;
|
|
17
|
+
read: boolean;
|
|
18
|
+
author: Profile;
|
|
19
|
+
};
|
|
20
|
+
export type NotificationSingle = NotificationBase & {
|
|
21
|
+
author: Profile;
|
|
22
|
+
};
|
|
23
|
+
export type PartialNotificationPost = PartialNotificationSingle & {
|
|
24
|
+
target: string;
|
|
25
|
+
};
|
|
26
|
+
export type NotificationPost = NotificationSingle & {
|
|
10
27
|
target: string;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
28
|
+
};
|
|
29
|
+
export type NotificationWarn = NotificationBase & {
|
|
13
30
|
reason: string;
|
|
14
|
-
}
|
|
15
|
-
export
|
|
31
|
+
};
|
|
32
|
+
export type NotificationBan = NotificationBase & {
|
|
16
33
|
soft: boolean;
|
|
17
34
|
until: Date;
|
|
18
35
|
reason: string;
|
|
19
|
-
}
|
|
20
|
-
export type Notification = NotificationSingle |
|
|
21
|
-
export type
|
|
36
|
+
};
|
|
37
|
+
export type Notification = NotificationSingle | NotificationWarn | NotificationBan;
|
|
38
|
+
export type PartialNotification = PartialNotificationSingle | PartialNotificationPost;
|
|
39
|
+
export type PartialInbox = {
|
|
22
40
|
id: string;
|
|
23
41
|
requests: {
|
|
24
42
|
children: string[];
|
|
25
43
|
following: string[];
|
|
26
44
|
followers: string[];
|
|
27
45
|
};
|
|
46
|
+
other: PartialNotificationSingle[];
|
|
47
|
+
};
|
|
48
|
+
export type Inbox = {
|
|
49
|
+
id: string;
|
|
50
|
+
requests: {
|
|
51
|
+
children: Profile[];
|
|
52
|
+
following: Profile[];
|
|
53
|
+
followers: Profile[];
|
|
54
|
+
};
|
|
28
55
|
other: Notification[];
|
|
29
56
|
};
|
package/lib/models/users.js
CHANGED
|
@@ -54,7 +54,7 @@ export class User {
|
|
|
54
54
|
this.followers += 1;
|
|
55
55
|
}
|
|
56
56
|
else if (res.status == 206) {
|
|
57
|
-
(_a = this.__session) === null || _a === void 0 ? void 0 : _a.inbox.requests.following.push(this
|
|
57
|
+
(_a = this.__session) === null || _a === void 0 ? void 0 : _a.inbox.requests.following.push(this);
|
|
58
58
|
}
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -122,7 +122,7 @@ export class User {
|
|
|
122
122
|
this.followers += 1;
|
|
123
123
|
}
|
|
124
124
|
else if (res.status == 206) {
|
|
125
|
-
(_a = this.__session) === null || _a === void 0 ? void 0 : _a.inbox.requests.following.push(this
|
|
125
|
+
(_a = this.__session) === null || _a === void 0 ? void 0 : _a.inbox.requests.following.push(this);
|
|
126
126
|
}
|
|
127
127
|
return;
|
|
128
128
|
}
|