beamsocial 0.7.4 → 0.8.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.
@@ -1,4 +1,4 @@
1
- import type { Profile, Settings, Relations, Tastes } from "./types/profiles";
1
+ import type { Profile, Settings, Relations, Tastes, Inbox } from "./types/profiles";
2
2
  export declare class Session {
3
3
  readonly id: string;
4
4
  readonly token: string | null;
@@ -7,14 +7,14 @@ export declare class Session {
7
7
  settings: Settings;
8
8
  relations: Relations;
9
9
  tastes: Tastes;
10
- inbox: {};
10
+ inbox: Inbox;
11
11
  constructor(id: string, token: string | null);
12
12
  __load(url: string, data: {
13
13
  profile?: Profile;
14
14
  avatar?: string;
15
15
  settings?: Settings;
16
16
  relations?: Relations;
17
- tastes: Tastes;
18
- inbox?: {};
17
+ tastes?: Tastes;
18
+ inbox?: Inbox;
19
19
  }): void;
20
20
  }
@@ -39,6 +39,22 @@ export type Relations = {
39
39
  children: string[];
40
40
  parent: string | null;
41
41
  };
42
+ export type Notification = {
43
+ id: string;
44
+ authors: string;
45
+ type: "like" | "repost" | "warn" | "follower" | "alert" | "official";
46
+ target: string;
47
+ read: boolean;
48
+ };
49
+ export type Inbox = {
50
+ id: string;
51
+ requests: {
52
+ children: string;
53
+ followers: string;
54
+ following: string;
55
+ };
56
+ other: Notification[];
57
+ };
42
58
  export type Tastes = {
43
59
  id: string;
44
60
  likes: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beamsocial",
3
- "version": "0.7.4",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "API-wrapper pour Beam",
6
6
  "main": "index.js",