export type EntityKind = "brew" | "tea" | "vendor" | "vessel" | "infuser"; export interface Author { did: string; handle: string; display_name: string; avatar: string; } export interface UserPreferences { temperature_unit?: string; [key: string]: unknown; } export interface Session { did: string; handle: string; display_name: string; avatar: string; is_authenticated: boolean; is_moderator: boolean; unread_notifications: number; user_preferences: UserPreferences; app: string; } export interface Vendor { rkey: string; name: string; location?: string; website?: string; description?: string; source_ref?: string; created_at?: string; } export interface Tea { rkey: string; name: string; category?: string; origin?: string; harvest_year?: number; description?: string; link?: string; vendor_rkey?: string; rating?: number | null; closed?: boolean; source_ref?: string; created_at?: string; vendor?: Vendor | null; } export interface Vessel { rkey: string; name: string; style?: string; capacity_ml?: number; material?: string; description?: string; link?: string; source_ref?: string; created_at?: string; } export interface Infuser { rkey: string; name: string; style?: string; material?: string; description?: string; link?: string; source_ref?: string; created_at?: string; } export interface Brew { rkey: string; tea_rkey: string; style: string; vessel_rkey?: string; infusion_method?: string; infuser_rkey?: string; temperature?: number; leaf_grams?: number; water_amount?: number; time_seconds?: number; tasting_notes?: string; rating?: number; created_at?: string; tea?: Tea | null; vessel_obj?: Vessel | null; infuser_obj?: Infuser | null; } export type OolongRecord = Brew | Tea | Vendor | Vessel | Infuser; export interface FeedItem { record_type: string; action?: string; uri?: string; cid?: string; rkey?: string; url?: string; author?: Author | null; timestamp?: string; time_ago?: string; like_count?: number; comment_count?: number; is_liked_by_viewer?: boolean; is_owner?: boolean; is_moderator?: boolean; can_hide_record?: boolean; can_block_user?: boolean; is_record_hidden?: boolean; record?: OolongRecord | null; } export interface FeedPage { items: FeedItem[]; cursor?: string; has_more?: boolean; } export interface DataResponse { did: string; teas: Tea[]; brews: Brew[]; vendors: Vendor[]; vessels: Vessel[]; infusers: Infuser[]; } export interface BrewEnvelope { rkey?: string; uri?: string; cid?: string; record: Brew; } export interface ProfileSummary { handle: string; display_name: string; avatar: string; } export interface ProfileResponse { did: string; profile: ProfileSummary; is_own_profile: boolean; brews: Brew[]; teas: Tea[]; vendors: Vendor[]; vessels: Vessel[]; infusers: Infuser[]; brew_count_by_tea: Record; } export interface ApiErrorBody { error: string; code: string; } export interface EntitySuggestion { name: string; source_uri?: string; fields?: Record; count?: number; } export type EntityInput = Record;