1 | /**
|
2 | * `User` represents a user on HN.
|
3 | *
|
4 | * @remarks
|
5 | * A `User` differs from a `RawUser` as some of its properties are renamed
|
6 | * and their values cleaned up.
|
7 | *
|
8 | * @see {@link RawUser}
|
9 | * @see {@link https://github.com/HackerNews/API#users}
|
10 | */
|
11 | export interface User {
|
12 | /** Unique, case-sensitive username */
|
13 | readonly id: string;
|
14 |
|
15 | /**
|
16 | * UTC timestamp in ISO 8601 format for when the user was created
|
17 | * (for example, `2021-10-02T18:12:10.149Z`)
|
18 | */
|
19 | readonly createdAt: string;
|
20 |
|
21 | /** User's total karma */
|
22 | readonly karma: number;
|
23 |
|
24 | /** User's profile description */
|
25 | readonly about?: string;
|
26 |
|
27 | /** List of IDs for the user's submissions */
|
28 | readonly submittedIds?: number[];
|
29 | }
|