{ "definitions": { "airlinepb.AirlineResponse": { "properties": { "balance": { "type": "number" }, "created_at": { "type": "string" }, "credit_rating": { "type": "integer" }, "equity_cached": { "type": "number" }, "equity_cached_at": { "type": "string" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "id": { "type": "string" }, "is_bankrupt": { "type": "boolean" }, "is_public": { "type": "boolean" }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "reputation": { "type": "integer" }, "safety_rating": { "type": "integer" }, "starting_airport_id": { "type": "string" } }, "type": "object" }, "airlinepb.CreateAirlineResponse": { "properties": { "balance": { "type": "number" }, "id": { "type": "string" } }, "type": "object" }, "dto.AccessTokenResponse": { "properties": { "access_token": { "type": "string" } }, "type": "object" }, "dto.CreateAirlineRequestDTO": { "properties": { "iata_code": { "example": "AA", "type": "string" }, "icao_code": { "example": "AAL", "type": "string" }, "name": { "example": "My Airline", "type": "string" }, "starting_airport_id": { "example": "11111111-1111-1111-1111-111111111111", "type": "string" } }, "type": "object" }, "dto.ErrorResponse": { "properties": { "error": { "type": "integer" } }, "type": "object" }, "dto.IDResponse": { "properties": { "id": { "type": "string" } }, "type": "object" }, "dto.LoginRequest": { "properties": { "login": { "maxLength": 50, "minLength": 3, "type": "string" }, "password": { "maxLength": 72, "minLength": 8, "type": "string" } }, "required": [ "login", "password" ], "type": "object" }, "dto.RegisterRequest": { "properties": { "email": { "maxLength": 255, "type": "string" }, "nickname": { "maxLength": 50, "minLength": 3, "type": "string" }, "password": { "maxLength": 72, "minLength": 8, "type": "string" } }, "required": [ "email", "nickname", "password" ], "type": "object" }, "fleetpb.Aircraft": { "properties": { "base_airport_id": { "type": "string" }, "current_maintenance_points": { "type": "number" }, "current_owner_id": { "type": "string" }, "fh_since_last_d_check": { "type": "number" }, "id": { "type": "string" }, "in_service": { "type": "boolean" }, "manufactured_at": { "type": "string" }, "max_maintenance_points_cached": { "type": "number" }, "status": { "type": "string" }, "tail_number": { "type": "string" }, "total_cycles": { "type": "number" }, "total_flight_hours": { "type": "number" }, "type_id": { "type": "string" } }, "type": "object" }, "fleetpb.AircraftType": { "properties": { "base_maintenance_points": { "type": "number" }, "base_turnaround_points": { "type": "number" }, "characteristics": { "type": "string" }, "cruising_speed_kph": { "type": "number" }, "d_check_interval_fh": { "type": "number" }, "d_check_interval_years": { "type": "number" }, "d_check_overdue_multiplier": { "type": "number" }, "fuel_consumption_per_hour": { "type": "number" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "id": { "type": "string" }, "image_upload_id": { "type": "string" }, "maint_cost_per_flight_hour": { "type": "number" }, "maint_cost_per_landing": { "type": "number" }, "maint_cost_per_takeoff": { "type": "number" }, "manufacturer_id": { "type": "string" }, "max_planned_seat_capacity": { "type": "number" }, "max_range_km": { "type": "number" }, "min_runway_length_m": { "type": "number" }, "model_name": { "type": "string" }, "mtow_kg": { "type": "number" }, "price_per_unit": { "type": "number" }, "production_points_price": { "type": "number" } }, "type": "object" }, "fleetpb.CreateAircraftRequest": { "properties": { "aircraft_type_id": { "type": "string" }, "base_airport_id": { "type": "string" }, "current_owner_id": { "type": "string" }, "tail_number": { "type": "string" } }, "type": "object" }, "fleetpb.CreateAircraftResponse": { "properties": { "id": { "type": "string" } }, "type": "object" }, "fleetpb.CreateAircraftTypeRequest": { "properties": { "base_maintenance_points": { "type": "number" }, "base_turnaround_points": { "type": "number" }, "characteristics": { "type": "string" }, "cruising_speed_kph": { "type": "number" }, "d_check_interval_fh": { "type": "number" }, "d_check_interval_years": { "type": "number" }, "d_check_overdue_multiplier": { "type": "number" }, "fuel_consumption_per_hour": { "type": "number" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "image_upload_id": { "type": "string" }, "maint_cost_per_flight_hour": { "type": "number" }, "maint_cost_per_landing": { "type": "number" }, "maint_cost_per_takeoff": { "type": "number" }, "manufacturer_id": { "type": "string" }, "max_planned_seat_capacity": { "type": "number" }, "max_range_km": { "type": "number" }, "min_runway_length_m": { "type": "number" }, "model_name": { "type": "string" }, "mtow_kg": { "type": "number" }, "price_per_unit": { "type": "number" }, "production_points_price": { "type": "number" } }, "type": "object" }, "fleetpb.ListAircraftTypesResponse": { "properties": { "items": { "items": { "$ref": "#/definitions/fleetpb.AircraftType" }, "type": "array" } }, "type": "object" }, "fleetpb.ListAircraftsResponse": { "properties": { "items": { "items": { "$ref": "#/definitions/fleetpb.Aircraft" }, "type": "array" } }, "type": "object" }, "operationspb.Airport": { "properties": { "continent": { "type": "string" }, "country_id": { "type": "string" }, "elevation_ft": { "type": "number" }, "fuel_price_multiplier": { "type": "number" }, "gate_fee": { "type": "number" }, "geog": { "type": "string" }, "geom": { "type": "string" }, "home_link": { "type": "string" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "local_name": { "type": "string" }, "maintenance_point_price": { "type": "number" }, "max_runway_length_m": { "type": "number" }, "max_runway_uses_per_day": { "type": "number" }, "municipality": { "type": "string" }, "region_id": { "type": "string" }, "runway_fee": { "type": "number" }, "stand_fee": { "type": "number" }, "timezone": { "type": "string" }, "turnaround_point_price": { "type": "number" }, "wikipedia_link": { "type": "string" }, "works_at_night": { "type": "boolean" } }, "type": "object" }, "operationspb.ChangeAirportRequest": { "properties": { "continent": { "type": "string" }, "country_id": { "type": "string" }, "elevation_ft": { "type": "number" }, "fuel_price_multiplier": { "type": "number" }, "gate_fee": { "type": "number" }, "geog": { "type": "string" }, "geom": { "type": "string" }, "home_link": { "type": "string" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "local_name": { "type": "string" }, "maintenance_point_price": { "type": "number" }, "max_runway_length_m": { "type": "number" }, "max_runway_uses_per_day": { "type": "number" }, "municipality": { "type": "string" }, "region_id": { "type": "string" }, "runway_fee": { "type": "number" }, "stand_fee": { "type": "number" }, "timezone": { "type": "string" }, "turnaround_point_price": { "type": "number" }, "wikipedia_link": { "type": "string" }, "works_at_night": { "type": "boolean" } }, "type": "object" }, "operationspb.ChangeCountryRequest": { "properties": { "aircraft_tail_code": { "type": "string" }, "corp_tax_rate": { "type": "number" }, "flythrough_permission_price": { "type": "number" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "iso": { "type": "string" }, "land_permission_price": { "type": "number" }, "local_name": { "type": "string" }, "vat_rate": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.ChangeRegionLinkRequest": { "properties": { "business": { "type": "number" }, "diaspora": { "type": "number" }, "id": { "type": "string" }, "region_a": { "type": "string" }, "region_b": { "type": "string" }, "base_daily_demand_ab": { "type": "number" }, "base_daily_demand_ba": { "type": "number" }, "tourism": { "type": "number" } }, "type": "object" }, "operationspb.ChangeRegionRequest": { "properties": { "business_score": { "type": "number" }, "country_id": { "type": "string" }, "gdp_per_capita": { "type": "number" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "local_code": { "type": "string" }, "local_name": { "type": "string" }, "population": { "type": "number" }, "tourism_score": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.Country": { "properties": { "aircraft_tail_code": { "type": "string" }, "corp_tax_rate": { "type": "number" }, "flythrough_permission_price": { "type": "number" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "iso": { "type": "string" }, "land_permission_price": { "type": "number" }, "local_name": { "type": "string" }, "vat_rate": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.CreateAirportRequest": { "properties": { "continent": { "type": "string" }, "country_id": { "type": "string" }, "elevation_ft": { "type": "number" }, "fuel_price_multiplier": { "type": "number" }, "gate_fee": { "type": "number" }, "geog": { "type": "string" }, "geom": { "type": "string" }, "home_link": { "type": "string" }, "iata_code": { "type": "string" }, "icao_code": { "type": "string" }, "intl_name": { "type": "string" }, "local_name": { "type": "string" }, "maintenance_point_price": { "type": "number" }, "max_runway_length_m": { "type": "number" }, "max_runway_uses_per_day": { "type": "number" }, "municipality": { "type": "string" }, "region_id": { "type": "string" }, "runway_fee": { "type": "number" }, "stand_fee": { "type": "number" }, "timezone": { "type": "string" }, "turnaround_point_price": { "type": "number" }, "wikipedia_link": { "type": "string" }, "works_at_night": { "type": "boolean" } }, "type": "object" }, "operationspb.CreateCountryRequest": { "properties": { "aircraft_tail_code": { "type": "string" }, "corp_tax_rate": { "type": "number" }, "flythrough_permission_price": { "type": "number" }, "intl_name": { "type": "string" }, "iso": { "type": "string" }, "land_permission_price": { "type": "number" }, "local_name": { "type": "string" }, "vat_rate": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.CreateRegionLinkRequest": { "properties": { "business": { "type": "number" }, "diaspora": { "type": "number" }, "region_a": { "type": "string" }, "region_b": { "type": "string" }, "base_daily_demand_ab": { "type": "number" }, "base_daily_demand_ba": { "type": "number" }, "tourism": { "type": "number" } }, "type": "object" }, "operationspb.CreateRegionRequest": { "properties": { "business_score": { "type": "number" }, "country_id": { "type": "string" }, "gdp_per_capita": { "type": "number" }, "intl_name": { "type": "string" }, "local_code": { "type": "string" }, "local_name": { "type": "string" }, "population": { "type": "number" }, "tourism_score": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.IDResponse": { "properties": { "id": { "type": "string" } }, "type": "object" }, "operationspb.ListAirportsResponse": { "properties": { "airports": { "items": { "$ref": "#/definitions/operationspb.Airport" }, "type": "array" } }, "type": "object" }, "operationspb.ListCountriesResponse": { "properties": { "countries": { "items": { "$ref": "#/definitions/operationspb.Country" }, "type": "array" } }, "type": "object" }, "operationspb.ListRegionLinksResponse": { "properties": { "region_links": { "items": { "$ref": "#/definitions/operationspb.RegionLink" }, "type": "array" } }, "type": "object" }, "operationspb.ListRegionsResponse": { "properties": { "regions": { "items": { "$ref": "#/definitions/operationspb.Region" }, "type": "array" } }, "type": "object" }, "operationspb.Region": { "properties": { "business_score": { "type": "number" }, "country_id": { "type": "string" }, "gdp_per_capita": { "type": "number" }, "id": { "type": "string" }, "intl_name": { "type": "string" }, "local_code": { "type": "string" }, "local_name": { "type": "string" }, "population": { "type": "number" }, "tourism_score": { "type": "number" }, "wikipedia_link": { "type": "string" } }, "type": "object" }, "operationspb.RegionLink": { "properties": { "business": { "type": "number" }, "diaspora": { "type": "number" }, "id": { "type": "string" }, "region_a": { "type": "string" }, "region_b": { "type": "string" }, "base_daily_demand_ab": { "type": "number" }, "base_daily_demand_ba": { "type": "number" }, "tourism": { "type": "number" } }, "type": "object" }, "bff.AirportPairDemand": { "properties": { "cached": { "type": "boolean" }, "destination_airport_id": { "type": "string" }, "destination_daily_passengers": { "type": "number" }, "distance_km": { "type": "number" }, "origin_airport_id": { "type": "string" }, "origin_daily_passengers": { "type": "number" }, "region_link_id": { "type": "string" } }, "type": "object" }, "bff.AirportPairDemandResponse": { "properties": { "demand": { "$ref": "#/definitions/bff.AirportPairDemand" } }, "type": "object" }, "bff.FleetAircraftDetailResponse": { "type": "object" }, "bff.FleetAircraftResponse": { "type": "object" }, "bff.FleetMarketResponse": { "type": "object" }, "bff.FleetPurchasePreviewResponse": { "type": "object" }, "bff.FleetPurchaseResponse": { "type": "object" }, "bff.DashboardSummary": { "properties": { "airline": { "type": "object" }, "alerts": { "items": { "type": "object" }, "type": "array" }, "base": { "type": "object" }, "fleet": { "type": "object" }, "flights": { "type": "object" }, "navigation_progress": { "items": { "type": "object" }, "type": "array" }, "next_action": { "type": "object" }, "routes": { "type": "object" }, "updated_at": { "type": "string" } }, "type": "object" }, "bff.MapState": { "properties": { "airports": { "type": "object" }, "capabilities": { "type": "object" }, "routes": { "type": "object" }, "scope": { "type": "string" }, "selected": { "type": "object" }, "viewport": { "type": "object" }, "warnings": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "host": "localhost:4200", "info": { "contact": { "email": "lboris201@yandex.ru", "name": "Jeno7u", "url": "https://github.com/Jeno7u" }, "title": "AirlineSim BFF API", "version": "1.0", "description": "Backend-for-frontend API. Based on backend OpenAPI and extended with BFF cache/filter query parameters." }, "paths": { "/aircraft": { "post": { "consumes": [ "application/json" ], "description": "Purchases a new aircraft from a selected aircraft type for the authenticated user", "parameters": [ { "description": "Aircraft details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/fleetpb.CreateAircraftRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Aircraft purchased successfully, id returned", "schema": { "$ref": "#/definitions/fleetpb.CreateAircraftResponse" } }, "400": { "description": "1 - request validation error, 2 - aircraft type not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal server error" } }, "summary": "Purchase aircraft", "tags": [ "Aircraft" ] } }, "/aircraft-types": { "get": { "consumes": [ "application/json" ], "description": "Returns a list of available aircraft types\n\nBFF caches this list in memory, retries safe backend failures within BFF_BACKEND_MAX_SAFE_ATTEMPTS, and supports exact field filters plus q search across text fields.", "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/fleetpb.ListAircraftTypesResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "List aircraft types", "tags": [ "Aircraft" ], "parameters": [ { "description": "Search query applied to all string fields.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Force BFF to refresh its in-memory cache from backend.", "enum": [ "true", "false" ], "in": "query", "name": "refresh", "required": false, "type": "string" }, { "description": "Exact BFF filter by base_maintenance_points.", "in": "query", "name": "base_maintenance_points", "required": false, "type": "number" }, { "description": "Exact BFF filter by base_turnaround_points.", "in": "query", "name": "base_turnaround_points", "required": false, "type": "number" }, { "description": "Exact BFF filter by characteristics.", "in": "query", "name": "characteristics", "required": false, "type": "string" }, { "description": "Exact BFF filter by cruising_speed_kph.", "in": "query", "name": "cruising_speed_kph", "required": false, "type": "number" }, { "description": "Exact BFF filter by d_check_interval_fh.", "in": "query", "name": "d_check_interval_fh", "required": false, "type": "number" }, { "description": "Exact BFF filter by d_check_interval_years.", "in": "query", "name": "d_check_interval_years", "required": false, "type": "number" }, { "description": "Exact BFF filter by d_check_overdue_multiplier.", "in": "query", "name": "d_check_overdue_multiplier", "required": false, "type": "number" }, { "description": "Exact BFF filter by fuel_consumption_per_hour.", "in": "query", "name": "fuel_consumption_per_hour", "required": false, "type": "number" }, { "description": "Exact BFF filter by iata_code.", "in": "query", "name": "iata_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by icao_code.", "in": "query", "name": "icao_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by id.", "in": "query", "name": "id", "required": false, "type": "string" }, { "description": "Exact BFF filter by image_upload_id.", "in": "query", "name": "image_upload_id", "required": false, "type": "string" }, { "description": "Exact BFF filter by maint_cost_per_flight_hour.", "in": "query", "name": "maint_cost_per_flight_hour", "required": false, "type": "number" }, { "description": "Exact BFF filter by maint_cost_per_landing.", "in": "query", "name": "maint_cost_per_landing", "required": false, "type": "number" }, { "description": "Exact BFF filter by maint_cost_per_takeoff.", "in": "query", "name": "maint_cost_per_takeoff", "required": false, "type": "number" }, { "description": "Exact BFF filter by manufacturer_id.", "in": "query", "name": "manufacturer_id", "required": false, "type": "string" }, { "description": "Exact BFF filter by max_planned_seat_capacity.", "in": "query", "name": "max_planned_seat_capacity", "required": false, "type": "number" }, { "description": "Exact BFF filter by max_range_km.", "in": "query", "name": "max_range_km", "required": false, "type": "number" }, { "description": "Exact BFF filter by min_runway_length_m.", "in": "query", "name": "min_runway_length_m", "required": false, "type": "number" }, { "description": "Exact BFF filter by model_name.", "in": "query", "name": "model_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by mtow_kg.", "in": "query", "name": "mtow_kg", "required": false, "type": "number" }, { "description": "Exact BFF filter by price_per_unit.", "in": "query", "name": "price_per_unit", "required": false, "type": "number" }, { "description": "Exact BFF filter by production_points_price.", "in": "query", "name": "production_points_price", "required": false, "type": "number" } ] }, "post": { "consumes": [ "application/json" ], "description": "Create a new aircraft type (admin only)", "parameters": [ { "description": "Aircraft type details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/fleetpb.CreateAircraftTypeRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/fleetpb.AircraftType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "Create aircraft type", "tags": [ "Aircraft" ] } }, "/aircraft-types/{id}": { "get": { "consumes": [ "application/json" ], "description": "Returns details for a single aircraft type", "parameters": [ { "description": "Aircraft type id", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/fleetpb.AircraftType" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "Get aircraft type", "tags": [ "Aircraft" ] } }, "/aircraft/{id}": { "get": { "consumes": [ "application/json" ], "description": "Returns details for a single aircraft owned by the airline", "parameters": [ { "description": "Aircraft id", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/fleetpb.Aircraft" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "Get aircraft", "tags": [ "Aircraft" ] }, "patch": { "consumes": [ "application/json" ], "description": "Update aircraft tail number (owner only)", "parameters": [ { "description": "Aircraft id", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "{\\", "in": "body", "name": "request", "required": true, "schema": { "type": "object" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/fleetpb.Aircraft" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "409": { "description": "Tail number conflict" }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "Update aircraft tail number", "tags": [ "Aircraft" ] } }, "/aircrafts": { "get": { "consumes": [ "application/json" ], "description": "Returns list of aircrafts owned by the authenticated airline", "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/fleetpb.ListAircraftsResponse" } }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "List aircrafts for airline", "tags": [ "Aircraft" ] } }, "/airline": { "post": { "consumes": [ "application/json" ], "description": "Creates an airline for the authenticated user", "parameters": [ { "description": "Airline details (owner_id taken from token)", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.CreateAirlineRequestDTO" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Airline created successfully", "schema": { "$ref": "#/definitions/airlinepb.CreateAirlineResponse" } }, "400": { "description": "1 - request validation error, 2 - airport not found, 3 - user not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "409": { "description": "Airline conflict" }, "500": { "description": "Internal server error" } }, "summary": "Create airline", "tags": [ "Airline" ] } }, "/airline/{id}": { "get": { "description": "Returns full airline information by airline id", "parameters": [ { "description": "Airline ID", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Airline information", "schema": { "$ref": "#/definitions/airlinepb.AirlineResponse" } }, "401": { "description": "Unauthorized" }, "404": { "description": "Airline not found" }, "500": { "description": "Internal server error" } }, "summary": "Get airline by id", "tags": [ "Airline" ] }, "patch": { "consumes": [ "application/json" ], "description": "Update airline name and codes (iata, icao). Only owner or admin allowed.", "parameters": [ { "description": "Airline ID", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "Fields to update: name, iata_code, icao_code", "in": "body", "name": "request", "required": true, "schema": { "type": "object" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/airlinepb.AirlineResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "409": { "description": "Conflict" }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } } }, "summary": "Update airline", "tags": [ "Airline" ] } }, "/airline/me": { "get": { "description": "Returns full airline information for the authenticated user", "produces": [ "application/json" ], "responses": { "200": { "description": "Airline information", "schema": { "$ref": "#/definitions/airlinepb.AirlineResponse" } }, "401": { "description": "Unauthorized" }, "404": { "description": "Airline not found" }, "500": { "description": "Internal server error" } }, "summary": "Get my airline", "tags": [ "Airline" ] } }, "/airport": { "post": { "consumes": [ "application/json" ], "description": "Returns", "parameters": [ { "description": "Airport details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.CreateAirportRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Airport created successfully, id returned", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - country with such country_id dont exists, 3 - region with such region_id dont exists", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "409": { "description": "Airport with such ICAO/IATA already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create Airport (admin only)", "tags": [ "Airport" ] } }, "/airport/{id}": { "delete": { "description": "Returns deleted airport id", "parameters": [ { "description": "Airport ID", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Airport deleted", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - invalid id", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Airport not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete airport (admin only)", "tags": [ "Airport" ] }, "put": { "consumes": [ "application/json" ], "description": "Returns patched airport id", "parameters": [ { "description": "Airport ID", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "Airport details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.ChangeAirportRequest" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Airport patched successfully", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - country not found, 3 - region not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Airport not found" }, "409": { "description": "Airport conflict" }, "500": { "description": "Internal server error" } }, "summary": "Change airport (admin only)", "tags": [ "Airport" ] } }, "/airports": { "get": { "description": "Returns all airports\n\nBFF caches this list in memory, retries safe backend failures within BFF_BACKEND_MAX_SAFE_ATTEMPTS, and supports exact field filters plus q search across text fields.", "produces": [ "application/json" ], "responses": { "200": { "description": "Airports list", "schema": { "$ref": "#/definitions/operationspb.ListAirportsResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal server error" } }, "summary": "List airports", "tags": [ "Airport" ], "parameters": [ { "description": "Search query applied to all string fields.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Force BFF to refresh its in-memory cache from backend.", "enum": [ "true", "false" ], "in": "query", "name": "refresh", "required": false, "type": "string" }, { "description": "Exact BFF filter by continent.", "in": "query", "name": "continent", "required": false, "type": "string" }, { "description": "Exact BFF filter by country_id.", "in": "query", "name": "country_id", "required": false, "type": "string" }, { "description": "Exact BFF filter by elevation_ft.", "in": "query", "name": "elevation_ft", "required": false, "type": "number" }, { "description": "Exact BFF filter by fuel_price_multiplier.", "in": "query", "name": "fuel_price_multiplier", "required": false, "type": "number" }, { "description": "Exact BFF filter by gate_fee.", "in": "query", "name": "gate_fee", "required": false, "type": "number" }, { "description": "Exact BFF filter by geog.", "in": "query", "name": "geog", "required": false, "type": "string" }, { "description": "Exact BFF filter by geom.", "in": "query", "name": "geom", "required": false, "type": "string" }, { "description": "Exact BFF filter by home_link.", "in": "query", "name": "home_link", "required": false, "type": "string" }, { "description": "Exact BFF filter by iata_code.", "in": "query", "name": "iata_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by icao_code.", "in": "query", "name": "icao_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by id.", "in": "query", "name": "id", "required": false, "type": "string" }, { "description": "Exact BFF filter by intl_name.", "in": "query", "name": "intl_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by local_name.", "in": "query", "name": "local_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by maintenance_point_price.", "in": "query", "name": "maintenance_point_price", "required": false, "type": "number" }, { "description": "Exact BFF filter by max_runway_length_m.", "in": "query", "name": "max_runway_length_m", "required": false, "type": "number" }, { "description": "Exact BFF filter by max_runway_uses_per_day.", "in": "query", "name": "max_runway_uses_per_day", "required": false, "type": "number" }, { "description": "Exact BFF filter by municipality.", "in": "query", "name": "municipality", "required": false, "type": "string" }, { "description": "Exact BFF filter by region_id.", "in": "query", "name": "region_id", "required": false, "type": "string" }, { "description": "Exact BFF filter by runway_fee.", "in": "query", "name": "runway_fee", "required": false, "type": "number" }, { "description": "Exact BFF filter by stand_fee.", "in": "query", "name": "stand_fee", "required": false, "type": "number" }, { "description": "Exact BFF filter by timezone.", "in": "query", "name": "timezone", "required": false, "type": "string" }, { "description": "Exact BFF filter by turnaround_point_price.", "in": "query", "name": "turnaround_point_price", "required": false, "type": "number" }, { "description": "Exact BFF filter by wikipedia_link.", "in": "query", "name": "wikipedia_link", "required": false, "type": "string" }, { "description": "Exact BFF filter by works_at_night.", "in": "query", "name": "works_at_night", "required": false, "type": "boolean" } ] } }, "/auth/login": { "post": { "consumes": [ "application/json" ], "description": "Returns access token and sets refresh token into cookie", "parameters": [ { "description": "User login details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.LoginRequest" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "User authenticated", "schema": { "$ref": "#/definitions/dto.AccessTokenResponse" } }, "400": { "description": "1 - request validation error, 2 - user not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error" } }, "summary": "Login user", "tags": [ "Auth" ] } }, "/auth/refresh": { "post": { "description": "Returns access token and sets refresh token into cookie. Doing that by validating refresh token", "produces": [ "application/json" ], "responses": { "200": { "description": "User authenticated", "schema": { "$ref": "#/definitions/dto.AccessTokenResponse" } }, "401": { "description": "Refresh token or user is not valid" }, "500": { "description": "Internal server error" } }, "summary": "Refreshes access and refresh token", "tags": [ "Auth" ] } }, "/auth/register": { "post": { "consumes": [ "application/json" ], "description": "Returns access token and sets refresh token into cookie", "parameters": [ { "description": "User registration details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.RegisterRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "User created and authenticated", "schema": { "$ref": "#/definitions/dto.AccessTokenResponse" } }, "400": { "description": "1 - request validation error, 2 - email exists, 3 - nickname exists", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "500": { "description": "Internal server error" } }, "summary": "Register user", "tags": [ "Auth" ] } }, "/countries": { "get": { "description": "Returns all countries\n\nBFF caches this list in memory, retries safe backend failures within BFF_BACKEND_MAX_SAFE_ATTEMPTS, and supports exact field filters plus q search across text fields.", "produces": [ "application/json" ], "responses": { "200": { "description": "Countries list", "schema": { "$ref": "#/definitions/operationspb.ListCountriesResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal server error" } }, "summary": "List countries", "tags": [ "Country" ], "parameters": [ { "description": "Search query applied to all string fields.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Force BFF to refresh its in-memory cache from backend.", "enum": [ "true", "false" ], "in": "query", "name": "refresh", "required": false, "type": "string" }, { "description": "Exact BFF filter by aircraft_tail_code.", "in": "query", "name": "aircraft_tail_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by corp_tax_rate.", "in": "query", "name": "corp_tax_rate", "required": false, "type": "number" }, { "description": "Exact BFF filter by flythrough_permission_price.", "in": "query", "name": "flythrough_permission_price", "required": false, "type": "number" }, { "description": "Exact BFF filter by id.", "in": "query", "name": "id", "required": false, "type": "string" }, { "description": "Exact BFF filter by intl_name.", "in": "query", "name": "intl_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by iso.", "in": "query", "name": "iso", "required": false, "type": "string" }, { "description": "Exact BFF filter by land_permission_price.", "in": "query", "name": "land_permission_price", "required": false, "type": "number" }, { "description": "Exact BFF filter by local_name.", "in": "query", "name": "local_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by vat_rate.", "in": "query", "name": "vat_rate", "required": false, "type": "number" }, { "description": "Exact BFF filter by wikipedia_link.", "in": "query", "name": "wikipedia_link", "required": false, "type": "string" } ] } }, "/country": { "post": { "consumes": [ "application/json" ], "description": "Returns", "parameters": [ { "description": "Country details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.CreateCountryRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Country created successfully, id returned", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "409": { "description": "Country with such ISO already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create country (admin only)", "tags": [ "Country" ] } }, "/country/{id}": { "delete": { "description": "Returns deleted country id", "parameters": [ { "description": "Country ID", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Country deleted", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - invalid id", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Country not found" }, "409": { "description": "Country has dependencies" }, "500": { "description": "Internal server error" } }, "summary": "Delete country (admin only)", "tags": [ "Country" ] }, "put": { "consumes": [ "application/json" ], "description": "Returns patched country id", "parameters": [ { "description": "Country ID", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "Country details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.ChangeCountryRequest" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Country patched successfully", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Country not found" }, "409": { "description": "Country conflict" }, "500": { "description": "Internal server error" } }, "summary": "Change country (admin only)", "tags": [ "Country" ] } }, "/region": { "post": { "consumes": [ "application/json" ], "description": "Returns", "parameters": [ { "description": "Region details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.CreateRegionRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Region created successfully, id returned", "schema": { "$ref": "#/definitions/dto.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - country with such country_id dont exists", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "409": { "description": "Region with such local code already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create Region (admin only)", "tags": [ "Region" ] } }, "/region-link": { "post": { "consumes": [ "application/json" ], "description": "Returns", "parameters": [ { "description": "Region Link details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.CreateRegionLinkRequest" } } ], "produces": [ "application/json" ], "responses": { "201": { "description": "Region Link created successfully, id returned", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - region with such region_id dont exists", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "409": { "description": "Region Link with such regions already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create Region Link (admin only)", "tags": [ "Region Link" ] } }, "/region-link/{id}": { "delete": { "description": "Returns deleted region link id", "parameters": [ { "description": "Region Link ID", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Region link deleted", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - invalid id", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Region link not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete region link (admin only)", "tags": [ "Region Link" ] }, "put": { "consumes": [ "application/json" ], "description": "Returns patched region link id", "parameters": [ { "description": "Region Link ID", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "Region link details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.ChangeRegionLinkRequest" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Region link patched successfully", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - region not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Region link not found" }, "409": { "description": "Region link conflict" }, "500": { "description": "Internal server error" } }, "summary": "Change region link (admin only)", "tags": [ "Region Link" ] } }, "/region-links": { "get": { "description": "Returns all region links\n\nBFF caches this list in memory, retries safe backend failures within BFF_BACKEND_MAX_SAFE_ATTEMPTS, and supports exact field filters plus q search across text fields.", "produces": [ "application/json" ], "responses": { "200": { "description": "Region links list", "schema": { "$ref": "#/definitions/operationspb.ListRegionLinksResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal server error" } }, "summary": "List region links", "tags": [ "Region Link" ], "parameters": [ { "description": "Search query applied to all string fields.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Force BFF to refresh its in-memory cache from backend.", "enum": [ "true", "false" ], "in": "query", "name": "refresh", "required": false, "type": "string" }, { "description": "Exact BFF filter by business.", "in": "query", "name": "business", "required": false, "type": "number" }, { "description": "Exact BFF filter by diaspora.", "in": "query", "name": "diaspora", "required": false, "type": "number" }, { "description": "Exact BFF filter by id.", "in": "query", "name": "id", "required": false, "type": "string" }, { "description": "Exact BFF filter by region_a.", "in": "query", "name": "region_a", "required": false, "type": "string" }, { "description": "Exact BFF filter by region_b.", "in": "query", "name": "region_b", "required": false, "type": "string" }, { "description": "Exact BFF filter by base_daily_demand_ab.", "in": "query", "name": "base_daily_demand_ab", "required": false, "type": "number" }, { "description": "Exact BFF filter by base_daily_demand_ba.", "in": "query", "name": "base_daily_demand_ba", "required": false, "type": "number" }, { "description": "Exact BFF filter by tourism.", "in": "query", "name": "tourism", "required": false, "type": "number" } ] } }, "/region/{id}": { "delete": { "description": "Returns deleted region id", "parameters": [ { "description": "Region ID", "in": "path", "name": "id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Region deleted", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - invalid id", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Region not found" }, "409": { "description": "Region has dependencies" }, "500": { "description": "Internal server error" } }, "summary": "Delete region (admin only)", "tags": [ "Region" ] }, "put": { "consumes": [ "application/json" ], "description": "Returns patched region id", "parameters": [ { "description": "Region ID", "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "Region details", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/operationspb.ChangeRegionRequest" } } ], "produces": [ "application/json" ], "responses": { "200": { "description": "Region patched successfully", "schema": { "$ref": "#/definitions/operationspb.IDResponse" } }, "400": { "description": "1 - request validation error, 2 - country not found", "schema": { "$ref": "#/definitions/dto.ErrorResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Region not found" }, "409": { "description": "Region conflict" }, "500": { "description": "Internal server error" } }, "summary": "Change region (admin only)", "tags": [ "Region" ] } }, "/regions": { "get": { "description": "Returns all regions\n\nBFF caches this list in memory, retries safe backend failures within BFF_BACKEND_MAX_SAFE_ATTEMPTS, and supports exact field filters plus q search across text fields.", "produces": [ "application/json" ], "responses": { "200": { "description": "Regions list", "schema": { "$ref": "#/definitions/operationspb.ListRegionsResponse" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal server error" } }, "summary": "List regions", "tags": [ "Region" ], "parameters": [ { "description": "Search query applied to all string fields.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Force BFF to refresh its in-memory cache from backend.", "enum": [ "true", "false" ], "in": "query", "name": "refresh", "required": false, "type": "string" }, { "description": "Exact BFF filter by business_score.", "in": "query", "name": "business_score", "required": false, "type": "number" }, { "description": "Exact BFF filter by country_id.", "in": "query", "name": "country_id", "required": false, "type": "string" }, { "description": "Exact BFF filter by gdp_per_capita.", "in": "query", "name": "gdp_per_capita", "required": false, "type": "number" }, { "description": "Exact BFF filter by id.", "in": "query", "name": "id", "required": false, "type": "string" }, { "description": "Exact BFF filter by intl_name.", "in": "query", "name": "intl_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by local_code.", "in": "query", "name": "local_code", "required": false, "type": "string" }, { "description": "Exact BFF filter by local_name.", "in": "query", "name": "local_name", "required": false, "type": "string" }, { "description": "Exact BFF filter by population.", "in": "query", "name": "population", "required": false, "type": "number" }, { "description": "Exact BFF filter by tourism_score.", "in": "query", "name": "tourism_score", "required": false, "type": "number" }, { "description": "Exact BFF filter by wikipedia_link.", "in": "query", "name": "wikipedia_link", "required": false, "type": "string" } ] } }, "/demand/airport-pair": { "get": { "description": "Lazily calculates base daily passenger demand for an airport pair using airport, region and region-link data. If the linked regions do not have cached base demand, BFF writes the generated values back to the backend region-link endpoint.", "parameters": [ { "description": "Origin backend airport id.", "in": "query", "name": "origin_airport_id", "required": true, "type": "string" }, { "description": "Destination backend airport id.", "in": "query", "name": "destination_airport_id", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.AirportPairDemandResponse" } }, "400": {}, "401": {}, "404": {}, "500": {} } } }, "/fleet/aircraft": { "get": { "description": "Returns the enriched owned fleet list with product-facing empty state.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetAircraftResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } }, "post": { "description": "Repeats purchase-preview checks, calls backend POST /aircraft once, clears relevant BFF caches and returns the enriched purchased aircraft plus next action.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetPurchaseResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } } }, "/fleet/aircraft/{id}": { "get": { "description": "Returns an enriched owned aircraft detail card for Fleet & Ops.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetAircraftDetailResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } } }, "/fleet/aircraft/{id}/tail-number": { "patch": { "description": "Validates and normalizes a tail number, forwards PATCH /aircraft/{id} once and returns the updated enriched aircraft card.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetAircraftDetailResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } } }, "/fleet/market": { "get": { "description": "Returns the Fleet & Ops aircraft market read model enriched with budget, base compatibility, recommendation score, warnings and owned aircraft summary.", "parameters": [ { "description": "Override aircraft base airport id for compatibility checks.", "in": "query", "name": "base_airport_id", "required": false, "type": "string" }, { "description": "Search aircraft model and codes.", "in": "query", "name": "q", "required": false, "type": "string" }, { "description": "Minimum aircraft range in kilometers.", "in": "query", "name": "min_range", "required": false, "type": "string" }, { "description": "Minimum planned seat capacity.", "in": "query", "name": "min_capacity", "required": false, "type": "string" }, { "description": "Maximum purchase price.", "in": "query", "name": "max_price", "required": false, "type": "string" }, { "description": "Sort order: recommended, price, capacity or range.", "in": "query", "name": "sort", "required": false, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetMarketResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } } }, "/fleet/purchase-preview": { "get": { "description": "Returns read-only purchase consequences: canPurchase, blocking reasons, warnings, balance impact, reserve estimate and tail-number validation.", "parameters": [ { "description": "Aircraft type id to preview.", "in": "query", "name": "aircraft_type_id", "required": true, "type": "string" }, { "description": "Base airport id to validate.", "in": "query", "name": "base_airport_id", "required": true, "type": "string" }, { "description": "Requested aircraft tail number.", "in": "query", "name": "tail_number", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.FleetPurchasePreviewResponse" } }, "400": {}, "401": {}, "404": {}, "409": {}, "500": {} } } }, "/finance/overview": { "get": { "description": "Returns available cash, operational result, fleet value, recent transactions and risks.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "404": {}, "500": {} } } }, "/finance/ledger": { "get": { "description": "Returns the current airline income and expense ledger.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "404": {}, "500": {} } } }, "/finance/routes": { "get": { "description": "Returns profitability aggregated by route.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "404": {}, "500": {} } } }, "/finance/flights/{id}": { "get": { "description": "Returns financial result and ledger transactions for a flight.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "404": {}, "500": {} } } }, "/finance/recalculate": { "post": { "description": "Idempotently reconciles completed flights into the BFF finance ledger.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "500": {} } } }, "/game/dashboard-summary": { "get": { "description": "Returns the shell Dashboard read model: airline status, base, fleet, route/flight empty capabilities, alerts, navigation progress and next best action.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.DashboardSummary" } }, "401": {}, "500": {} } } }, "/game/map-state": { "get": { "description": "Returns GeoJSON-oriented map state for the shell Dashboard and map remote. The map remote visualizes this payload and does not call backend directly.", "parameters": [ { "description": "Map scenario scope.", "enum": [ "dashboard", "network", "operations" ], "in": "query", "name": "scope", "required": false, "type": "string" }, { "description": "Selected airport id for detail card enrichment.", "in": "query", "name": "selected_airport_id", "required": false, "type": "string" }, { "description": "Selected route id for future route detail enrichment.", "in": "query", "name": "selected_route_id", "required": false, "type": "string" }, { "description": "Whether route opportunities should be included.", "enum": [ "true", "false" ], "in": "query", "name": "include_opportunities", "required": false, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "schema": { "$ref": "#/definitions/bff.MapState" } }, "401": {}, "500": {} } } }, "/events/feed": { "get": { "description": "Returns persistent immutable events for the current airline.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/events/feed/{id}": { "get": { "description": "Returns one event owned by the current airline.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/notifications": { "get": { "description": "Returns active or resolved notifications after deterministic risk reconciliation.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/notifications/summary": { "get": { "description": "Returns active and unread notification counts for Shell.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/facilities/base-overview": { "get": { "description": "Returns the starting base constraints, slots, costs and aircraft compatibility read model.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/facilities/airports/{id}/constraints": { "get": { "description": "Returns constraint diagnostics for an airport and optional aircraft/type/route.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/admin/session": { "get": { "description": "Returns the current user admin capability probe.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/admin/audit": { "get": { "description": "Returns the retained BFF admin audit trail. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/admin/world/readiness": { "get": { "description": "Returns blockers and warnings for the minimum playable world.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/admin/import/world-data/status": { "get": { "description": "Returns the latest protected import job status.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/admin/import/world-data/jobs/{id}": { "get": { "description": "Returns one protected import job status.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "404": {}, "500": {} } } }, "/notifications/{id}": { "patch": { "description": "Marks a notification read or unread without changing risk resolution.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "404": {}, "500": {} } } }, "/notifications/read-all": { "post": { "description": "Marks all active notifications for the current airline as read.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "500": {} } } }, "/admin/import/world-data": { "post": { "description": "Starts one protected dry-run or import job. Requires world.manage.", "produces": [ "application/json" ], "responses": { "202": {}, "401": {}, "403": {}, "500": {} } } }, "/admin/settings/external-proxy": { "get": { "description": "Returns the external source proxy origin without credentials. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": { "schema": { "properties": { "origin": { "type": "string", "x-nullable": true } }, "required": [ "origin" ], "type": "object" } }, "401": {}, "403": {} } }, "put": { "description": "Sets the HTTP or HTTPS proxy for external downloads. Send null to remove it. Requires world.manage.", "parameters": [ { "in": "body", "name": "settings", "required": true, "schema": { "properties": { "proxyUrl": { "type": "string", "x-nullable": true } }, "required": [ "proxyUrl" ], "type": "object" } } ], "produces": [ "application/json" ], "responses": { "200": { "schema": { "properties": { "origin": { "type": "string", "x-nullable": true } }, "required": [ "origin" ], "type": "object" } }, "400": {}, "401": {}, "403": {} } } }, "/admin/world/airports": { "get": { "description": "Lists protected admin world resource airports. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "500": {} } }, "post": { "description": "Creates protected admin world resource airports. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "201": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/airports/{id}": { "delete": { "description": "Deletes protected admin world resource airports. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "204": {}, "401": {}, "403": {}, "409": {}, "500": {} } }, "patch": { "description": "Updates protected admin world resource airports. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/countries": { "get": { "description": "Lists protected admin world resource countries. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "500": {} } }, "post": { "description": "Creates protected admin world resource countries. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "201": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/countries/{id}": { "delete": { "description": "Deletes protected admin world resource countries. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "204": {}, "401": {}, "403": {}, "409": {}, "500": {} } }, "patch": { "description": "Updates protected admin world resource countries. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/region-links": { "get": { "description": "Lists protected admin world resource region-links. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "500": {} } }, "post": { "description": "Creates protected admin world resource region-links. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "201": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/region-links/{id}": { "delete": { "description": "Deletes protected admin world resource region-links. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "204": {}, "401": {}, "403": {}, "409": {}, "500": {} } }, "patch": { "description": "Updates protected admin world resource region-links. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/regions": { "get": { "description": "Lists protected admin world resource regions. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "401": {}, "403": {}, "500": {} } }, "post": { "description": "Creates protected admin world resource regions. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "201": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } }, "/admin/world/regions/{id}": { "delete": { "description": "Deletes protected admin world resource regions. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "204": {}, "401": {}, "403": {}, "409": {}, "500": {} } }, "patch": { "description": "Updates protected admin world resource regions. Requires world.manage.", "produces": [ "application/json" ], "responses": { "200": {}, "400": {}, "401": {}, "403": {}, "409": {}, "500": {} } } } }, "schemes": [ "http" ], "swagger": "2.0" }