48 lines
995 B
TypeScript
48 lines
995 B
TypeScript
import { definePrefix, type Puuid } from "./puuid"
|
|
|
|
export const UserID = definePrefix("user");
|
|
export const GroupID = definePrefix("group");
|
|
export const ServerID = definePrefix("srv");
|
|
export const FriendRequestID = definePrefix("frq");
|
|
|
|
export type UserId = Puuid<"user">;
|
|
export type GroupId = Puuid<"group">;
|
|
export type ServerId = Puuid<"srv">;
|
|
export type FriendRequestID = Puuid<"frq">;
|
|
|
|
export const Status: Record<string, 1|2|3> = {
|
|
OFFLINE: 1,
|
|
DND: 2,
|
|
ONLINE: 3
|
|
}
|
|
|
|
export type OverviewUser = {
|
|
id: string;
|
|
username: string;
|
|
image: string;
|
|
};
|
|
|
|
export type OverviewServer = {
|
|
id: string;
|
|
name: string;
|
|
ownerId: string;
|
|
image: string;
|
|
};
|
|
export type OverviewGroup = {
|
|
id: string;
|
|
name: string;
|
|
ownerId: string;
|
|
members: number;
|
|
image: string;
|
|
};
|
|
|
|
export interface OverviewData {
|
|
friends: OverviewUser[],
|
|
groups: OverviewGroup[],
|
|
servers: OverviewServer[],
|
|
};
|
|
|
|
export interface UserWithStatus extends OverviewUser {
|
|
status: 1|2|3,
|
|
statusMessage: string
|
|
}
|