-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
68 lines (61 loc) · 1.47 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
declare interface IUser {
_id: string;
username: string;
displayName: string;
email: string;
emailVerified: boolean;
newEmail: string;
profilePictureUrl: string;
profilePictureCloudId?: string;
onboarded: boolean;
}
declare interface IAccount {
_id: string,
user: string,
providerAccountId: string,
provider: string,
endpoint?: string,
accessToken: string,
accessTokenSecret?: string,
refreshToken?: string,
displayName: string,
userName: string,
internalListId?: string,
}
declare interface RawPost {
post_id: string;
provider: string;
endpoint: string;
provider_account: {
username: string;
id: string;
display_name: string;
profile_image_url: string;
};
url: string;
created_at: Date;
account_id: string;
content: string;
attachments: Attachment[],
engagement_stats: {
likes: number,
comments: number,
reposts: number,
}
}
declare interface PostResult {
data: RawPost[],
pagination: {
max_id?: string,
min_id?: string,
}
}
declare interface Attachment {
type: string,
url: string,
preview_url: string,
}
declare interface IPublicUser extends Omit<IUser, "profilePictureCloudId" | "newEmail" | "emailVerified" | "email" | "onboarded"> {
}
declare interface IPublicAccount extends Omit<IAccount, "internalListId" | "refreshToken" | "accessToken" | "accessTokenSecret"> {
}