All files / src/models profile.ts

0% Statements 0/0
0% Branches 1/1
0% Functions 1/1
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166                                                                                                                                                                                                                                                                                                                                           
export interface EventSummary {
  id: string;
  title: string;
  start_time: string;
  end_time?: string | null;
  status: string;
  category?: string;
  category_name?: string;
  image_url?: string | null;
  location_address?: string | null;
  privacy_level?: 'PUBLIC' | 'PROTECTED' | 'PRIVATE';
  approved_participant_count?: number;
  participants_count?: number;
  host_score?: {
    final_score: number | null;
    hosted_event_rating_count: number;
  };
}
 
export interface UserProfile {
  id: string;
  username: string;
  email: string;
  phone_number?: string;
  gender?: string;
  birth_date?: string;
  email_verified: boolean;
  status: string;
  default_location_address?: string;
  default_location_lat?: number;
  default_location_lon?: number;
  display_name?: string;
  bio?: string;
  avatar_url?: string;
  locale?: string | null;
}
 
export interface ProfileEquipmentItem {
  id: string;
  name: string;
  description?: string | null;
  image_url?: string | null;
}
 
export interface ShowcaseImageItem {
  id: string;
  image_url: string;
}
 
export interface PublicProfile {
  user_id: string;
  username: string;
  display_name?: string | null;
  avatar_url?: string | null;
  bio?: string | null;
  final_score?: number | null;
  host_rating_count: number;
  participant_rating_count: number;
  equipment: ProfileEquipmentItem[];
  showcase_images: ShowcaseImageItem[];
}
 
export interface UpdateProfileRequest {
  display_name?: string | null;
  bio?: string | null;
  avatar_url?: string | null;
  default_location_address?: string | null;
  default_location_lat?: number | null;
  default_location_lon?: number | null;
  locale?: string | null;
}
 
export interface ChangePasswordRequest {
  old_password: string;
  new_password: string;
}
 
/* ── Favorite Locations ── */
 
export interface FavoriteLocation {
  id: string;
  name: string;
  address: string;
  lat: number;
  lon: number;
}
 
export interface FavoriteLocationsResponse {
  items: FavoriteLocation[];
}
 
export interface CreateFavoriteLocationRequest {
  name: string;
  address: string;
  lat: number;
  lon: number;
}
 
export interface UpdateFavoriteLocationRequest {
  name?: string;
  address?: string;
  lat?: number;
  lon?: number;
}
 
export interface ImageUploadInstruction {
  variant: 'ORIGINAL' | 'SMALL';
  method: 'PUT';
  url: string;
  headers: Record<string, string>;
}
 
export interface ImageUploadInitResponse {
  base_url: string;
  version: number;
  confirm_token: string;
  uploads: ImageUploadInstruction[];
}
 
export interface ImageUploadConfirmRequest {
  confirm_token: string;
}
 
export interface EquipmentListResponse {
  items: ProfileEquipmentItem[];
}
 
export interface CreateEquipmentRequest {
  name: string;
  description?: string | null;
  image_url?: string | null;
}
 
export interface UpdateEquipmentRequest {
  name?: string | null;
  description?: string | null;
  image_url?: string | null;
}
 
export type BadgeCategory = 'HOSTING' | 'PARTICIPATION' | 'SOCIAL';
 
export interface BadgeBase {
  slug: string;
  name: string;
  description: string;
  icon_url: string | null;
  category: BadgeCategory;
}
 
export interface EarnedBadge extends BadgeBase {
  earned_at: string;
}
 
export interface CatalogBadge extends BadgeBase {
  earned: boolean;
  earned_at: string | null;
}
 
export interface UserBadgesResponse {
  items: EarnedBadge[];
}
 
export interface BadgeCatalogResponse {
  items: CatalogBadge[];
}