Foxnouns.NET/Foxnouns.Frontend/app/lib/api/user.ts

50 lines
932 B
TypeScript
Raw Normal View History

2024-09-17 22:12:12 +02:00
export type PartialUser = {
2024-06-09 15:48:26 +02:00
id: string;
username: string;
2024-09-17 22:12:12 +02:00
display_name?: string | null;
avatar_url?: string | null;
};
export type User = PartialUser & {
2024-06-09 15:48:26 +02:00
bio: string | null;
member_title: string | null;
links: string[];
2024-09-17 22:12:12 +02:00
names: FieldEntry[];
pronouns: Pronoun[];
fields: Field[];
};
export type UserWithMembers = User & { members: PartialMember[] };
export type UserWithHiddenFields = User & {
auth_methods?: unknown[];
member_list_hidden: boolean;
last_active: string;
2024-06-09 15:48:26 +02:00
};
export type UserSettings = {
dark_mode: boolean | null;
};
2024-09-17 22:12:12 +02:00
export type PartialMember = {
id: string;
name: string;
display_name: string | null;
bio: string | null;
avatar_url: string | null;
names: FieldEntry[];
pronouns: Pronoun[];
};
export type FieldEntry = {
value: string;
status: string;
};
export type Pronoun = FieldEntry & { display_text: string | null };
export type Field = {
name: string;
entries: FieldEntry[];
};