1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
2// See the LICENCE file in the repository root for full licence text.
3
4interface CommonProps {
5 display_name: string;
6}
7
8interface GithubProps {
9 github_url: string;
10 github_username: string;
11}
12
13interface IdProps {
14 id: number;
15}
16
17interface OsuProps {
18 osu_username: string;
19 user_id: number;
20 user_url: string;
21}
22
23type Null<T> = Record<keyof T, null>;
24
25type GithubUserJson = CommonProps & GithubProps & IdProps & (OsuProps | Null<OsuProps>);
26type Legacy = CommonProps & Null<GithubProps> & Null<IdProps> & OsuProps;
27type Placeholder = CommonProps & GithubProps & Null<IdProps> & Null<OsuProps>;
28
29export default GithubUserJson;
30export type GithubUserJsonForChangelog = GithubUserJson | Legacy | Placeholder;