import { AttemptPeriodType } from './AttemptPeriodType'; import { SAWPrizeType } from './SAWPrizeType'; import { SAWPrizeUI } from './SAWPrizeUI'; export interface SAWPrize { /** ID of the prize */ saw_prize_id: number; /** Visual definition of the prize (name, icon, win-modal buttons, per-game rendering hints) */ saw_prize_ui_definition: SAWPrizeUI; /** Numeric value for 'points' / 'spin' prize types (e.g. 100 for "100 points"); not relevant for other types */ prize_value?: number; /** The type of the prize — see {@link SAWPrizeType} */ prize_type_id: SAWPrizeType; /** Competition games (MatchX / Quiz): first finishing place this prize applies to */ place_from?: number; /** Competition games (MatchX / Quiz): last finishing place this prize applies to; equals `place_from` for a single-place prize */ place_to?: number; /** Client-side only — unique id of a win instance generated by the default Smartico UI to dedupe render effects; never sent by the server */ sawUniqueWinId?: string; /** Remaining stock. Present only when the template's `expose_game_stat_on_api` is enabled; always present for MatchX / Quiz games */ pool?: number; /** Initial (configured) stock. Present regardless of `expose_game_stat_on_api` */ pool_initial?: number; /** Times the prize has been won, across all players. Present only when `expose_game_stat_on_api` is enabled */ wins_count?: number; /** ISO weekday numbers (1 = Monday … 7 = Sunday) the prize can be won on; absent = any day. Present only when `expose_game_stat_on_api` is enabled */ weekdays?: number[]; /** Prize availability window start (epoch ms), evaluated against `relative_period_timezone`. Present only when `expose_game_stat_on_api` is enabled */ active_from_ts?: number; /** Prize availability window end (epoch ms), evaluated against `relative_period_timezone`. Present only when `expose_game_stat_on_api` is enabled */ active_till_ts?: number; /** Timezone offset in minutes for `weekdays` / active-window evaluation (UTC minus local, as in JS `Date.getTimezoneOffset()`) */ relative_period_timezone?: number; /** When true, the prize stays winnable at `pool` 0 (unlimited stock) */ is_surcharge?: boolean; /** Always `false` in API responses — deleted prizes are excluded server-side */ is_deleted?: boolean; /** Type-specific prize details — e.g. `gems` / `_gems_diamonds_type` for gems-and-diamonds prizes, `tickets_count` for raffle-ticket prizes */ prize_details_json?: {[key: string]: any}; /** Period basis for the prize availability restriction — see {@link AttemptPeriodType} */ max_give_period_type_id?: AttemptPeriodType; }