/**
 * @copyright 2026 NHCarrigan
 * @license Naomi's Public License
 * @author Naomi Carrigan
 */

/* eslint-disable @typescript-eslint/naming-convention -- Prisma enum values use UPPER_CASE */
enum PrimaryBadge {
  STAFF = "STAFF",
  MOD = "MOD",
  VIP = "VIP",
  DISCORD = "DISCORD",
}
/* eslint-enable @typescript-eslint/naming-convention */

interface User {
  id:             string;
  email:          string;
  username:       string;
  avatar?:        string;
  slug?:          string;
  displayName?:   string;
  bio?:           string;
  profilePublic:  boolean;
  primaryBadge?:  PrimaryBadge;
  website?:       string;
  discordServer?: string;
  bluesky?:       string;
  github?:        string;
  linkedin?:      string;
  twitch?:        string;
  youtube?:       string;
  discordId:      string;
  isAdmin:        boolean;
  isBanned:       boolean;
  inDiscord:      boolean;
  isVip:          boolean;
  isMod:          boolean;
  isStaff:        boolean;
}

interface JwtPayload {

  /**
   * User id.
   */
  sub:      string;
  email:    string;
  username: string;
  isAdmin:  boolean;
  iat?:     number;
  exp?:     number;
}

interface AuthResponse {
  accessToken: string;
  user:        User;
}

export { PrimaryBadge };
export type { AuthResponse, JwtPayload, User };
