/** * Calcutta Auction Types * * Types related to Calcutta auction competitions, bidding, escrow, and payouts */ /** * Calcutta competition * * Main competition configuration for a Calcutta auction */ export interface CalcuttaCompetitionProps { /** Unique calcutta competition identifier */ calcutta_competition_id: string; /** Competition display name */ competition_name: string; /** Competition description */ competition_description?: string; /** Admin player ID */ admin_id: string; /** Market type */ market_type: 'FOR_MONEY' | 'FREE'; /** Auction format */ auction_type: 'sealed_bid' | 'live' | 'sweepstakes'; /** Competition status lifecycle: pending → scheduled → auction_open → auction_closed → inprogress → closed */ status: string; /** Auction status: not_started | in_progress | closed */ auction_status: string; /** Flat fee to participate (optional) */ entry_fee: number; /** Minimum bid amount */ min_bid: number; /** Minimum bid increase for live auction */ bid_increment: number; /** Sum of all winning bids */ total_pot: number; /** Accumulated unclaimed payouts from unsold items (rolls forward between rounds) */ unclaimed_pot?: number; /** Maximum participants (0 = unlimited) */ max_participants: number; /** Whether competition is invite-only */ invite_only: boolean; /** Optional competition invite code */ competition_code?: string; /** Payout distribution type */ payout_type: 'round' | 'placement' | 'both'; /** Optional competition image */ image?: { url: string }; /** Group ID */ group_id?: string; /** Company ID */ company_id?: string; /** Scheduled start datetime */ scheduled_datetime?: any; /** Auction start datetime */ auction_start_datetime?: any; /** Auction end datetime */ auction_end_datetime?: any; /** Currently active auction item (live mode) */ current_auction_item_id?: string; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; /** Rounds (populated on detail fetch) */ rounds?: CalcuttaRoundProps[]; /** Auction items (populated on detail fetch) */ items?: CalcuttaAuctionItemProps[]; /** Participants (populated on detail fetch) */ participants?: CalcuttaParticipantProps[]; /** Payout rules (populated on detail fetch) */ payout_rules?: CalcuttaPayoutRuleProps[]; /** Item results (populated on detail fetch) */ item_results?: CalcuttaItemResultProps[]; /** Template ID if created from a template */ calcutta_template_id?: string; /** Maximum escrow deposit per player (budget cap) */ max_escrow?: number; /** Minimum percentage of deposited funds a player must bid (1-100) */ min_spend_pct?: number; /** Seconds each item gets when first activated in live auction (default 60) */ item_timer_seconds?: number; /** Timer resets to this when a bid arrives in the last N seconds (default 15) */ bid_extension_seconds?: number; } /** * Calcutta round * * Self-managed round structure for a Calcutta competition */ export interface CalcuttaRoundProps { /** Unique round identifier */ calcutta_round_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Round sequence number */ round_number: number; /** Round display name (e.g., "Round of 64", "Make the Cut") */ round_name: string; /** Round status: pending | inprogress | closed */ status: string; /** Prize description for this round (sweepstakes only) */ prize_description?: string; /** Prize image for this round (sweepstakes only) */ prize_image?: { url: string }; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta auction item * * A team or athlete being auctioned in a Calcutta competition */ export interface CalcuttaAuctionItemProps { /** Unique auction item identifier */ calcutta_auction_item_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Team/athlete ID from sr_svc */ item_id: string; /** Display name */ item_name: string; /** Item type */ item_type: 'team' | 'athlete'; /** Seed number */ seed?: number; /** Sequence for live auction */ auction_order: number; /** Item status: pending | active | sold | unsold | eliminated */ status: string; /** Current highest bid */ current_bid: number; /** Final winning bid amount */ winning_bid: number; /** Player who won this item */ winning_player_id?: string; /** Item image */ item_image?: { url: string }; /** Server-authoritative deadline for when this item's bidding closes (live auction) */ item_deadline?: any; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; /** Number of distinct bidders (sealed bid only, amounts hidden) */ bid_count?: number; } /** * Calcutta bid * * A bid placed on an auction item */ export interface CalcuttaBidProps { /** Unique bid identifier */ calcutta_bid_id: string; /** Auction item this bid is for */ calcutta_auction_item_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Player who placed the bid */ player_id: string; /** Bid amount */ bid_amount: number; /** Bid status: active | outbid | won | cancelled */ bid_status: string; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta participant * * A player participating in a Calcutta competition */ export interface CalcuttaParticipantProps { /** Unique participant identifier */ calcutta_participant_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Player ID */ player_id: string; /** Participant status */ status: string; /** Sum of winning bids */ total_spent: number; /** Total winnings from payouts */ total_winnings: number; /** Final placement */ place?: number; /** Number of items owned */ items_owned: number; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta escrow * * Player escrow balance for a specific Calcutta competition */ export interface CalcuttaEscrowProps { /** Unique escrow identifier */ calcutta_escrow_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Player ID */ player_id: string; /** Available funds for bidding */ escrow_balance: number; /** Funds locked in active/winning bids */ committed_balance: number; /** Total deposited across all deposits */ total_deposited: number; /** Total withdrawn across all withdrawals */ total_withdrawn: number; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta payout rule * * Defines how the pot is distributed for a round or placement */ export interface CalcuttaPayoutRuleProps { /** Unique payout rule identifier */ calcutta_payout_rule_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Associated round (for round-based rules) */ calcutta_round_id?: string; /** Payout type: round | placement */ payout_type: 'round' | 'placement'; /** Round number (for round-based rules) */ round_number?: number; /** Placement position (for placement-based rules) */ placement?: number; /** Percentage of total pot */ payout_pct: number; /** Description (e.g., "Sweet 16", "1st Place") */ description?: string; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta item result * * Tracks how an auction item performed in a specific round */ export interface CalcuttaItemResultProps { /** Unique result identifier */ calcutta_item_result_id: string; /** Auction item ID */ calcutta_auction_item_id: string; /** Parent competition ID */ calcutta_competition_id: string; /** Associated round */ calcutta_round_id?: string; /** Round number */ round_number?: number; /** Placement position */ placement?: number; /** Result: advanced | eliminated | won | placed */ result: 'advanced' | 'eliminated' | 'won' | 'placed'; /** Payout earned for this result */ payout_earned: number; /** Whether payout has been processed */ processed: boolean; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta template * * Reusable tournament template for creating Calcutta competitions */ export interface CalcuttaTemplateProps { /** Unique template identifier */ calcutta_template_id: string; /** Template display name */ template_name: string; /** Template description */ template_description?: string; /** Sport category */ sport?: string; /** System admin who created it */ admin_id: string; /** Template status: draft | active | closed */ status: string; /** Default item type */ item_type: string; /** Optional template image */ image?: { url: string }; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; /** Template items (populated on detail fetch) */ items?: CalcuttaTemplateItemProps[]; /** Template rounds (populated on detail fetch) */ rounds?: CalcuttaTemplateRoundProps[]; } /** * Calcutta template item * * A team or athlete defined in a template */ export interface CalcuttaTemplateItemProps { /** Unique template item identifier */ calcutta_template_item_id: string; /** Parent template ID */ calcutta_template_id: string; /** Team/athlete ID from sr_svc */ item_id: string; /** Display name */ item_name: string; /** Item type */ item_type: string; /** Seed number */ seed?: number; /** Item image */ item_image?: { url: string }; /** Item status: active | eliminated */ status?: string; /** Round number in which this item was eliminated (null if still active) */ eliminated_round_number?: number; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Calcutta template round * * Round definition in a template */ export interface CalcuttaTemplateRoundProps { /** Unique template round identifier */ calcutta_template_round_id: string; /** Parent template ID */ calcutta_template_id: string; /** Round sequence number */ round_number: number; /** Round display name */ round_name: string; /** Round status: pending | closed */ status: string; /** Prize description for this round (sweepstakes only) */ prize_description?: string; /** Prize image for this round (sweepstakes only) */ prize_image?: { url: string }; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; }