|
| 1 | +interface Application { |
| 2 | + link: string; |
| 3 | + id: string; |
| 4 | + name: string; |
| 5 | +} |
| 6 | + |
| 7 | +interface Assets { |
| 8 | + hero: string; |
| 9 | + hero_video: string | null; |
| 10 | + quest_bar_hero: string; |
| 11 | + quest_bar_hero_video: string | null; |
| 12 | + game_tile: string; |
| 13 | + logotype: string; |
| 14 | + game_tile_light: string; |
| 15 | + game_tile_dark: string; |
| 16 | + logotype_light: string; |
| 17 | + logotype_dark: string; |
| 18 | +} |
| 19 | + |
| 20 | +interface Colors { |
| 21 | + primary: string; |
| 22 | + secondary: string; |
| 23 | +} |
| 24 | + |
| 25 | +interface Messages { |
| 26 | + quest_name: string; |
| 27 | + game_title: string; |
| 28 | + game_publisher: string; |
| 29 | +} |
| 30 | + |
| 31 | +interface TaskEvent { |
| 32 | + event_name: string; |
| 33 | + target: number; |
| 34 | + external_ids: string[]; |
| 35 | +} |
| 36 | + |
| 37 | +interface TaskEventNoExternalIds { |
| 38 | + event_name: string; |
| 39 | + target: number; |
| 40 | + external_ids: never[]; |
| 41 | +} |
| 42 | + |
| 43 | +interface TaskConfig { |
| 44 | + type: number; |
| 45 | + join_operator: string; |
| 46 | + tasks: { |
| 47 | + PLAY_ON_XBOX?: TaskEvent; |
| 48 | + PLAY_ON_DESKTOP?: TaskEventNoExternalIds; |
| 49 | + PLAY_ON_PLAYSTATION?: TaskEvent; |
| 50 | + WATCH_VIDEO_ON_MOBILE?: TaskEventNoExternalIds; |
| 51 | + WATCH_VIDEO?: TaskEventNoExternalIds; |
| 52 | + }; |
| 53 | +} |
| 54 | + |
| 55 | +interface ApplicationRef { |
| 56 | + id: string; |
| 57 | +} |
| 58 | + |
| 59 | +interface TaskV2Base { |
| 60 | + type: string; |
| 61 | + target: number; |
| 62 | +} |
| 63 | + |
| 64 | +interface PlayTask extends TaskV2Base { |
| 65 | + applications: ApplicationRef[]; |
| 66 | + external_ids?: string[]; |
| 67 | +} |
| 68 | + |
| 69 | +interface VideoAsset { |
| 70 | + url: string; |
| 71 | + width: number; |
| 72 | + height: number; |
| 73 | + thumbnail: string; |
| 74 | + caption?: string; |
| 75 | + transcript?: string; |
| 76 | +} |
| 77 | + |
| 78 | +interface VideoTaskAssets { |
| 79 | + video: VideoAsset; |
| 80 | + video_low_res: VideoAsset; |
| 81 | + video_hls: VideoAsset; |
| 82 | +} |
| 83 | + |
| 84 | +interface VideoTaskMessages { |
| 85 | + video_title: string; |
| 86 | + video_end_cta_title?: string; |
| 87 | + video_end_cta_subtitle?: string; |
| 88 | + video_end_cta_button_label?: string; |
| 89 | +} |
| 90 | + |
| 91 | +interface WatchVideoTask extends TaskV2Base { |
| 92 | + assets: VideoTaskAssets; |
| 93 | + messages: VideoTaskMessages; |
| 94 | +} |
| 95 | + |
| 96 | +interface TaskConfigV2 { |
| 97 | + tasks: { |
| 98 | + PLAY_ON_XBOX?: PlayTask; |
| 99 | + PLAY_ON_DESKTOP?: PlayTask; |
| 100 | + PLAY_ON_PLAYSTATION?: PlayTask; |
| 101 | + WATCH_VIDEO_ON_MOBILE?: WatchVideoTask; |
| 102 | + WATCH_VIDEO?: WatchVideoTask; |
| 103 | + }; |
| 104 | + join_operator: string; |
| 105 | +} |
| 106 | + |
| 107 | +interface RewardMessages { |
| 108 | + name: string; |
| 109 | + name_with_article: string; |
| 110 | + redemption_instructions_by_platform: { |
| 111 | + '0': string; |
| 112 | + }; |
| 113 | +} |
| 114 | + |
| 115 | +interface Reward { |
| 116 | + type: number; |
| 117 | + sku_id: string; |
| 118 | + messages: RewardMessages; |
| 119 | + orb_quantity?: number; |
| 120 | + asset?: string; |
| 121 | + asset_video?: null; |
| 122 | + approximate_count?: null; |
| 123 | + redemption_link?: null; |
| 124 | + expires_at?: string; |
| 125 | + expires_at_premium?: null; |
| 126 | + expiration_mode?: number; |
| 127 | +} |
| 128 | + |
| 129 | +interface RewardsConfig { |
| 130 | + assignment_method: number; |
| 131 | + rewards: Reward[]; |
| 132 | + rewards_expire_at: string; |
| 133 | + platforms: number[]; |
| 134 | +} |
| 135 | + |
| 136 | +interface CTAConfig { |
| 137 | + link: string; |
| 138 | + button_label: string; |
| 139 | + android?: { |
| 140 | + android_app_id: string; |
| 141 | + }; |
| 142 | + ios?: { |
| 143 | + ios_app_id: string; |
| 144 | + }; |
| 145 | + subtitle?: string; |
| 146 | +} |
| 147 | + |
| 148 | +interface VideoMetadataMessages { |
| 149 | + video_title: string; |
| 150 | + video_end_cta_button_label: string; |
| 151 | + video_end_cta_title?: string; |
| 152 | + video_end_cta_subtitle?: string; |
| 153 | +} |
| 154 | + |
| 155 | +interface VideoMetadataAssets { |
| 156 | + video_player_video_hls: string; |
| 157 | + video_player_video: string; |
| 158 | + video_player_thumbnail: string; |
| 159 | + video_player_video_low_res: string; |
| 160 | + video_player_caption: string | null; |
| 161 | + video_player_transcript: string | null; |
| 162 | + quest_bar_preview_video: null; |
| 163 | + quest_bar_preview_thumbnail: null; |
| 164 | + quest_home_video: null; |
| 165 | +} |
| 166 | + |
| 167 | +interface VideoMetadata { |
| 168 | + messages: VideoMetadataMessages; |
| 169 | + assets: VideoMetadataAssets; |
| 170 | +} |
| 171 | + |
| 172 | +interface QuestConfig { |
| 173 | + id: string; |
| 174 | + config_version: number; |
| 175 | + starts_at: string; |
| 176 | + expires_at: string; |
| 177 | + features: number[]; |
| 178 | + application: Application; |
| 179 | + assets: Assets; |
| 180 | + colors: Colors; |
| 181 | + messages: Messages; |
| 182 | + task_config: TaskConfig; |
| 183 | + task_config_v2: TaskConfigV2; |
| 184 | + rewards_config: RewardsConfig; |
| 185 | + share_policy: string; |
| 186 | + cta_config: CTAConfig; |
| 187 | + video_metadata?: VideoMetadata; |
| 188 | +} |
| 189 | + |
| 190 | +interface ProgressHeartbeat { |
| 191 | + last_beat_at: string; |
| 192 | + expires_at: null; |
| 193 | +} |
| 194 | + |
| 195 | +interface ProgressTask { |
| 196 | + value: number; |
| 197 | + event_name: string; |
| 198 | + updated_at: string; |
| 199 | + completed_at: string; |
| 200 | + heartbeat: ProgressHeartbeat | null; |
| 201 | +} |
| 202 | + |
| 203 | +interface UserProgress { |
| 204 | + PLAY_ON_DESKTOP?: ProgressTask; |
| 205 | + PLAY_ON_XBOX?: ProgressTask; |
| 206 | + PLAY_ON_PLAYSTATION?: ProgressTask; |
| 207 | + WATCH_VIDEO_ON_MOBILE?: ProgressTask; |
| 208 | + WATCH_VIDEO?: ProgressTask; |
| 209 | +} |
| 210 | + |
| 211 | +interface UserStatus { |
| 212 | + user_id: string; |
| 213 | + quest_id: string; |
| 214 | + enrolled_at: string; |
| 215 | + completed_at: string; |
| 216 | + claimed_at: string; |
| 217 | + claimed_tier: null; |
| 218 | + last_stream_heartbeat_at: null; |
| 219 | + stream_progress_seconds: number; |
| 220 | + dismissed_quest_content: number; |
| 221 | + progress: UserProgress; |
| 222 | +} |
| 223 | + |
| 224 | +interface Quest { |
| 225 | + id: string; |
| 226 | + config: QuestConfig; |
| 227 | + user_status: UserStatus | null; |
| 228 | + targeted_content: never[]; |
| 229 | + preview: boolean; |
| 230 | + traffic_metadata_raw: string; |
| 231 | + traffic_metadata_sealed: string; |
| 232 | +} |
| 233 | + |
| 234 | +export interface QuestResponse { |
| 235 | + quests: Quest[]; |
| 236 | +} |
0 commit comments