diff --git a/features/aircraft/aircraft.create.feature b/features/aircraft/aircraft.create.feature index 3bdc2e64..cbeb6681 100644 --- a/features/aircraft/aircraft.create.feature +++ b/features/aircraft/aircraft.create.feature @@ -103,8 +103,8 @@ Feature: Create aircraft for operator "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 9, - "fleetTypes": ["A339", "B748"], + "fleetSize": 10, + "fleetTypes": ["A339", "A359", "B748"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, diff --git a/features/aircraft/aircraft.list.feature b/features/aircraft/aircraft.list.feature index 86ffba2d..3aff0a96 100644 --- a/features/aircraft/aircraft.list.feature +++ b/features/aircraft/aircraft.list.feature @@ -457,6 +457,31 @@ Feature: List aircraft "lastAirportUpdatedAt": "2026-01-01T08:00:00.000Z", "holdVariant": null, "lastParkingPosition": null + }, + { + "id": "915fb458-d587-4256-adec-3b07951aaf25", + "airframe": { + "type": "A359", + "iataType": "359", + "name": "Airbus A350-900", + "cruiseSpeed": { "value": 0.85, "unit": "mach" }, + "serviceCeiling": 43100, + "performanceCode": "D", + "weightCategory": "heavy", + "serviceType": "passenger" + }, + "registration": "D-AIXP", + "selcal": null, + "livery": "Lufthansa 2026", + "currentState": "idle", + "etopsThresholdMinutes": null, + "isConfirmed": false, + "cabinLayout": null, + "baseAirport": null, + "lastAirport": null, + "lastAirportUpdatedAt": null, + "holdVariant": null, + "lastParkingPosition": null } ] """ diff --git a/features/aircraft/aircraft.update.feature b/features/aircraft/aircraft.update.feature index a263a4a8..71d11687 100644 --- a/features/aircraft/aircraft.update.feature +++ b/features/aircraft/aircraft.update.feature @@ -82,8 +82,8 @@ Feature: Update aircraft "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, diff --git a/features/operator/operator.list-by-service-type.feature b/features/operator/operator.list-by-service-type.feature index c52d5537..de3089d0 100644 --- a/features/operator/operator.list-by-service-type.feature +++ b/features/operator/operator.list-by-service-type.feature @@ -17,8 +17,8 @@ Feature: Filter operators by service type "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -160,8 +160,8 @@ Feature: Filter operators by service type "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -303,8 +303,8 @@ Feature: Filter operators by service type "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -456,8 +456,8 @@ Feature: Filter operators by service type "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, diff --git a/features/operator/operator.list-recent.feature b/features/operator/operator.list-recent.feature index cdf9d0f2..4279c6ac 100644 --- a/features/operator/operator.list-recent.feature +++ b/features/operator/operator.list-recent.feature @@ -74,8 +74,8 @@ Feature: List recent operators "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -103,8 +103,8 @@ Feature: List recent operators "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -223,8 +223,8 @@ Feature: List recent operators "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, @@ -404,8 +404,8 @@ Feature: List recent operators "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, diff --git a/features/operator/operator.list.feature b/features/operator/operator.list.feature index 0d394fa3..ca239564 100644 --- a/features/operator/operator.list.feature +++ b/features/operator/operator.list.feature @@ -36,8 +36,8 @@ Feature: List operators "type": "legacy", "serviceType": "both", "hubs": ["FRA", "MUC"], - "fleetSize": 8, - "fleetTypes": ["A339"], + "fleetSize": 9, + "fleetTypes": ["A339", "A359"], "avgFleetAge": 14.2, "logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png", "backgroundUrl": null, diff --git a/package-lock.json b/package-lock.json index 2a1040e9..ed150153 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flight-tracker-api", - "version": "3.91.0", + "version": "3.92.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "flight-tracker-api", - "version": "3.91.0", + "version": "3.92.0", "license": "Unlicense", "dependencies": { "@faker-js/faker": "^10.6.0", diff --git a/package.json b/package.json index 8567bb53..1ce8fa83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flight-tracker-api", - "version": "3.91.0", + "version": "3.92.0", "private": true, "homepage": "https://mypreflight.io", "author": "mypreflight", diff --git a/prisma/seed/resource/aircrafts.seed.ts b/prisma/seed/resource/aircrafts.seed.ts index 77b10114..4ea70684 100644 --- a/prisma/seed/resource/aircrafts.seed.ts +++ b/prisma/seed/resource/aircrafts.seed.ts @@ -444,6 +444,24 @@ export async function loadAircraft( lastParkingPositionId: null, }; + const a359unconfirmed: Aircraft = { + id: '915fb458-d587-4256-adec-3b07951aaf25', + type: 'A359', + registration: 'D-AIXP', + selcal: null, + livery: 'Lufthansa 2026', + cabinLayout: null, + holdVariant: null, + isConfirmed: false, + operatorId: DLH, + currentState: AircraftState.idle, + etopsThresholdMinutes: null, + baseAirportId: null, + lastAirportId: null, + lastAirportUpdatedAt: null, + lastParkingPositionId: null, + }; + for (const aircraft of [ a330, a321, @@ -453,6 +471,7 @@ export async function loadAircraft( a320af, b752fi, b738kl, + a359unconfirmed, ]) { await tx.aircraft.create({ data: aircraft }); } diff --git a/prisma/seed/resource/operators.seed.ts b/prisma/seed/resource/operators.seed.ts index 58f9171a..f8eb7060 100644 --- a/prisma/seed/resource/operators.seed.ts +++ b/prisma/seed/resource/operators.seed.ts @@ -49,8 +49,8 @@ export async function loadOperators( type: OperatorType.legacy, serviceType: OperatorServiceType.both, hubs: ['FRA', 'MUC'] as Prisma.InputJsonValue, - fleetSize: 8, - fleetTypes: ['A339'] as Prisma.InputJsonValue, + fleetSize: 9, + fleetTypes: ['A339', 'A359'] as Prisma.InputJsonValue, avgFleetAge: 14.2, logoUrl: 'https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png', diff --git a/src/modules/manifest/data/fleet-coverage.spec.ts b/src/modules/manifest/data/fleet-coverage.spec.ts index 4566a766..b013290d 100644 --- a/src/modules/manifest/data/fleet-coverage.spec.ts +++ b/src/modules/manifest/data/fleet-coverage.spec.ts @@ -4,6 +4,11 @@ import { findHoldLayoutByType } from './cargo-holds'; const SEEDS = ['aircrafts.seed.ts', 'cargo-flights.seed.ts']; const DEGRADED_PATH_FIXTURE_TYPES = ['B762']; +const IMPORTED_UNCURATED_TYPES = ['A359']; +const UNCURATED_TYPES = [ + ...DEGRADED_PATH_FIXTURE_TYPES, + ...IMPORTED_UNCURATED_TYPES, +]; const DESIGNATOR = /^\s+type: '([A-Z0-9]{3,4})',$/gm; function fleetTypes(): string[] { @@ -26,7 +31,7 @@ describe('curated hold data against the operated fleet', () => { it('covers every airframe type an aircraft is recorded as', () => { const uncovered = fleetTypes() - .filter((type) => !DEGRADED_PATH_FIXTURE_TYPES.includes(type)) + .filter((type) => !UNCURATED_TYPES.includes(type)) .filter((type) => findHoldLayoutByType(type) === undefined); expect(uncovered).toEqual([]); @@ -42,7 +47,7 @@ describe('curated hold data against the operated fleet', () => { it('gives every fleet type a default variant to fall back to', () => { const withoutDefault = fleetTypes() - .filter((type) => !DEGRADED_PATH_FIXTURE_TYPES.includes(type)) + .filter((type) => !UNCURATED_TYPES.includes(type)) .filter((type) => { const layout = findHoldLayoutByType(type);