This commit refactors the domain types to better represent flight-related data.
Key changes:
- Deleted the unused `Character` data class.
- Introduced new data classes:
- `Airport`: Represents airport information with sealed subtypes for `Departure`, `Arrival`, and `Connecting` airports.
- `AirportInfo`: Contains detailed information about an airport, including `City`, `MacCity`, `Region`, `Country`, and `Coordinates`.
- `City`: Represents city data with code and name.
- `Coordinates`: Represents geographical coordinates.
- `Country`: Represents country data including currency code.
- `Flight`: Top-level data class for flight information, including currency and a list of `Trip` objects.
- `MacCity`: Represents MAC (Multi-Airport City) code.
- `Region`: Represents region data.
- `RegularFare`: Contains a list of `TripFare` objects.
- `Route`: Defines a flight route with departure, arrival, and optional connecting airports.
- `Segment`: Represents a flight segment with origin, destination, flight number, dates, and duration.
- `Trip`: Represents a trip with a list of `TripDate` objects, origin, and destination.
- `TripDate`: Contains a date and a list of `TripFlight` objects for that date.
- `TripFare`: Represents a fare type with amount and count.
- `TripFlight`: Represents a specific flight within a trip, including fare information, segments, and operator.
This commit introduces Retrofit and Moshi to handle network requests and JSON parsing.
Key changes include:
- Added Retrofit, Moshi, OkHttp, and OkHttp Logging Interceptor dependencies to `libs.versions.toml` and `model/data/api/build.gradle.kts`.
- Created data classes for API responses: `AirportResponse`, `RouteResponse`, and `FlightResponse`.
- Defined Retrofit service interfaces: `AirportService`, `RoutesService`, and `FlightService`.
- Implemented a Hilt `NetworkModule` to provide Retrofit, Moshi, and OkHttpClient instances.
- Added a Detekt configuration file for the `model/data/api` module.
- Temporarily commented out `configureFlavors` in `AndroidApplicationConvention.kt` and `ConfigureLibrary.kt`.