/** * Typed loaders for real API response fixtures. * * Captured from https://flights.test.aeroflot.ru on 2026-04-17 * via scripts/fetch-api-fixtures.sh. Re-run that script to refresh. * * Use these in tests to validate code against real API shapes instead * of hand-rolled minimal mocks. */ import type { IBoardResponse, IDaysResponse } from "@/features/online-board/types"; import type { IScheduleResponse, IScheduleDetailsResponse, IScheduleDaysResponse, } from "@/features/schedule/types"; import type { IDestinationsResponse, IFlightsMapDaysResponse, } from "@/features/flights-map/types"; import type { PopularRequest } from "@/features/popular-requests/types"; import type { IRawRegion, IRawCountry, IRawCity, IRawAirport, } from "@/shared/dictionaries/types"; import appSettings from "./app-settings.json"; import boardByFlight from "./board-by-flight.json"; import boardByRoute from "./board-by-route.json"; import boardDaysFlight from "./board-days-flight.json"; import boardDaysRoute from "./board-days-route.json"; import destinationsFrom from "./destinations-from.json"; import destinationsRoute from "./destinations-route.json"; import dictionaryAirports from "./dictionary-airports.json"; import dictionaryCities from "./dictionary-cities.json"; import dictionaryCountries from "./dictionary-countries.json"; import dictionaryRegions from "./dictionary-regions.json"; import mapDaysRoute from "./map-days-route.json"; import onlineboardDetails from "./onlineboard-details.json"; import popularRequests from "./popular-requests.json"; import scheduleDaysRoute from "./schedule-days-route.json"; import scheduleDetails from "./schedule-details.json"; import scheduleSearch from "./schedule-search.json"; export interface AppSettings { showDebugVersion: string; uiOptions: { isTestVersion: string; filter: Record; buttons: { buyTicket?: { period?: { min?: string; max?: string } }; flightStatus?: { availableFrom?: string; visible?: string }; }; }; } export const fixtures = { appSettings: appSettings as AppSettings, boardByFlight: boardByFlight as unknown as IBoardResponse, boardByRoute: boardByRoute as unknown as IBoardResponse, boardDaysFlight: boardDaysFlight as unknown as IDaysResponse, boardDaysRoute: boardDaysRoute as unknown as IDaysResponse, destinationsFrom: destinationsFrom as unknown as IDestinationsResponse, destinationsRoute: destinationsRoute as unknown as IDestinationsResponse, dictionaryAirports: dictionaryAirports as unknown as IRawAirport[], dictionaryCities: dictionaryCities as unknown as IRawCity[], dictionaryCountries: dictionaryCountries as unknown as IRawCountry[], dictionaryRegions: dictionaryRegions as unknown as IRawRegion[], mapDaysRoute: mapDaysRoute as unknown as IFlightsMapDaysResponse, onlineboardDetails: onlineboardDetails as unknown as IBoardResponse, popularRequests: popularRequests as unknown as PopularRequest[], scheduleDaysRoute: scheduleDaysRoute as unknown as IScheduleDaysResponse, scheduleDetails: scheduleDetails as unknown as IScheduleDetailsResponse, scheduleSearch: scheduleSearch as unknown as IScheduleResponse, } as const;