-
Notifications
You must be signed in to change notification settings - Fork 11
/
types.ts
57 lines (51 loc) · 1.12 KB
/
types.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
import { ObjectId } from "mongodb";
export enum SOURCE {
dev = "DEV",
hashnode = "hashnode",
}
export enum COLLECTION_NAMES {
articles = "articles",
eomStats = "eom-stats",
followers = "followers",
}
export enum VIEWS_MILESTONE {
hundred = 100,
two_hundred_fifty = 2.5 * hundred,
five_hundred = 5 * hundred,
thousand = 1000,
two_thousand = 2 * thousand,
five_thousand = 5 * thousand,
ten_thousand = 10 * thousand,
}
export enum REACTIONS_MILESTONE {
fifty = 50,
hundred = 100,
two_hundred = 2 * hundred,
five_hundred = 5 * hundred,
}
export interface Article {
id: number;
source: SOURCE;
title: string;
shortUrl: string;
published_at: number;
lastViewsMilestone: number;
lastReactionsMilestone: number;
lastTweetedAt: number;
}
export interface DevArticle {
id: number;
type_of: string;
published_timestamp: string;
title: string;
description: string;
published: boolean;
slug: string;
url: string;
comments_count: number;
public_reactions_count: number;
page_views_count: number;
positive_reactions_count: number;
cover_image: string;
reading_time_minutes: number;
}