/** * Poll types * * Types for polls, poll options, and flash market campaigns */ export type CouponPayoutProps = 'participate' | 'win'; /** * Poll campaign * * Represents a campaign that contains one or more polls/flash markets */ export interface PollCampaignProps { /** Unique campaign identifier */ poll_campaign_id: string; /** Campaign name */ name: string; /** Owner player ID */ player_id: string; /** Company ID (optional, for company-owned campaigns) */ company_id?: string; /** Admin player IDs who can manage this campaign */ admins: string[]; /** Phone number associated with the campaign */ phone: string; /** Flash markets associated with this campaign */ flash_markets?: PollProps[]; /** Total number of poll responses across all polls */ total_responses: number; /** Campaign type */ campaign_type: string; /** Current campaign status */ status: string; /** Whether this campaign is publicly visible */ public?: boolean; /** Market type for this campaign */ market_type?: string; /** Campaign image */ campaign_image?: { url: string; width?: number; height?: number; }; /** Stream configuration */ stream?: { url?: string; stream_type?: string; id?: string; twitch_type?: 'video' | 'channel'; active?: boolean; }; /** Auth strategy ID */ auth_strategy_id?: string; /** Total number of responders (enriched) */ total_responders?: number; /** Number of active polls (enriched) */ active_polls?: number; /** Total number of polls (enriched) */ total_polls?: number; /** Prize image */ prize_image?: any; /** Group ID */ group_id?: string; /** Whether to notify poll results */ notify_poll_results?: boolean; /** Prize override text */ prize_override?: string; /** Referral code */ referral_code?: string; /** Whether to break ties */ break_ties?: boolean; /** Coupon campaign ID */ coupon_campaign_id?: string; /** Share coupon campaign ID */ share_coupon_campaign_id?: string; /** Coupon payout type */ coupon_payout_type?: CouponPayoutProps; /** Whether close message has been sent */ close_message_sent?: boolean; /** Timestamp when created */ create_datetime: any; /** Timestamp of last update */ last_update_datetime: any; } /** * Poll definition * * Represents a single poll/question within a campaign */ export interface PollProps { /** Unique poll identifier */ poll_id: string; /** Campaign this poll belongs to */ poll_campaign_id: string; /** The poll question text */ poll_question: string; /** Whether this is an active flash market */ flash_active?: boolean; /** Base stake amount */ base_stake?: number; /** Reason if poll was voided */ void_reason?: string; /** Current poll status */ status: string; /** Admin player IDs */ admins?: string[]; /** Coupon campaign ID */ coupon_campaign_id?: string; /** Coupon payout type */ coupon_payout_type?: CouponPayoutProps; /** Whether poll requires resolution */ require_resolution?: boolean; /** Whether this is a tie-breaker poll */ tie_breaker?: boolean; /** Poll image */ poll_image?: { url: string; width?: number; height?: number; }; /** When the poll starts */ start_datetime?: any; /** Template identifier */ template?: string; /** League ID */ league_id?: string; /** Contest type */ contest_type?: string; /** Contest ID */ contest_id?: string; /** Side type */ side_type?: string; /** Side ID */ side_id?: string; /** Hidden clue text */ hidden_clue?: string; /** Poll type - select (multiple choice) or input (free text) */ poll_type: 'select' | 'input'; /** Input type for input polls */ input_type?: 'string' | 'number'; /** Whether to show responses to participants */ show_responses: boolean; /** Minimum stake allowed */ minimum_stake: number; /** Maximum stake allowed */ max_stake: number; /** Display priority */ priority: number; /** Whether multiple responses are allowed */ multi_responses_allowed?: boolean; /** Whether stake increases are allowed */ stake_increase_allowed?: boolean; /** When the poll ends */ end_datetime: any; /** Winning option ID */ winning_option_id?: string; /** Winning value */ winning_value?: string; /** Whether current user has responded */ responded?: boolean; /** Whether poll can only be closed manually */ manual_close_only?: boolean; /** Total number of responses */ total_responses?: number; /** Time limit in seconds */ seconds_allowed?: number; /** Total number of options */ total_options?: number; /** Poll options */ poll_options?: PollOptionProps[]; /** Poll summaries */ poll_summaries?: PollSummaryProps[]; /** Timestamp when created */ create_datetime: any; /** Timestamp of last update */ last_update_datetime: any; } /** * Poll summary * * Aggregated response summary for a poll option */ export interface PollSummaryProps { /** Poll ID */ poll_id: string; /** Poll option ID */ poll_option_id: string; /** Number of responses */ count: number; /** Total stake */ stake: number; /** Total winnings */ winnings: number; /** Percentage of total responses */ pct: number; /** Player IDs who selected this option */ player_ids: string[]; } /** * Poll option * * A selectable option within a poll */ export interface PollOptionProps { /** Unique poll option identifier */ poll_option_id: string; /** Poll this option belongs to */ poll_id: string; /** Option type - select or input */ option_type: 'select' | 'input'; /** Display name for the option */ option_name: string; /** Option value */ option_value: string; /** Input type for input options */ input_type?: string; /** Current option status */ status: string; /** Initial odds for this option */ initial_odds?: number; /** Display priority */ priority?: number; /** Result indicator */ result_ind?: 'win' | 'lose' | 'draw'; /** Parimutuel odds */ parimutuel_odds?: number; /** Response message */ response_message?: string; /** Whether user has responded to this option */ respond?: boolean; /** Timestamp when created */ create_datetime: any; /** Timestamp of last update */ last_update_datetime: any; } //# sourceMappingURL=polls.types.d.ts.map