pronounsfu/frontend/src/lib/types.ts

28 lines
503 B
TypeScript
Raw Normal View History

2022-05-05 07:33:44 -07:00
export interface MeUser {
id: string;
username: string;
display_name: string | null;
bio: string | null;
avatar_source: string | null;
avatar_url: string | null;
links: string[] | null;
discord: string | null;
discord_username: string | null;
}
export interface APIError {
code: ErrorCode;
message?: string;
}
export enum ErrorCode {
BadRequest = 400,
Forbidden = 403,
InternalServerError = 500,
InvalidState = 1001,
InvalidOAuthCode = 1002,
UserNotFound = 2001,
}