From 2ae1d6ba599ba78204ba8b66d249bbdb54ab9e08 Mon Sep 17 00:00:00 2001 From: Oleksii Date: Thu, 21 Mar 2024 12:33:34 +0200 Subject: [PATCH 1/3] TC-3724: operatingAirline return for each segment --- src/Services/Air/AirFormat.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Services/Air/AirFormat.js b/src/Services/Air/AirFormat.js index 985acc7f..660c5cb7 100644 --- a/src/Services/Air/AirFormat.js +++ b/src/Services/Air/AirFormat.js @@ -79,6 +79,10 @@ function getBaggageInfo(info) { } function formatSegment(segment) { + const operatingAirline = segment['air:CodeshareInfo'] + ? segment['air:CodeshareInfo'].OperatingCarrier + : null; + const seg = { from: segment.Origin, to: segment.Destination, @@ -86,6 +90,7 @@ function formatSegment(segment) { departure: segment.DepartureTime, arrival: segment.ArrivalTime, airline: segment.Carrier, + operatingAirline, flightNumber: segment.FlightNumber, uapi_segment_ref: segment.Key, uapiSegmentReference: segment.Key, From a7263ef36a57c069b41786fc19934cef9f81466e Mon Sep 17 00:00:00 2001 From: Oleksii Date: Thu, 21 Mar 2024 12:33:59 +0200 Subject: [PATCH 2/3] TC-3724: tests update --- test/Air/AirParser.test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Air/AirParser.test.js b/test/Air/AirParser.test.js index 3335f65a..01a303be 100644 --- a/test/Air/AirParser.test.js +++ b/test/Air/AirParser.test.js @@ -57,8 +57,8 @@ const checkLowSearchFareXml = (filename) => { (segment) => { expect(segment).to.be.an('object'); expect(segment).to.have.all.keys([ - 'from', 'to', 'departure', 'arrival', 'airline', 'flightNumber', 'serviceClass', - 'plane', 'details', 'duration', 'techStops', 'bookingClass', 'baggage', + 'from', 'to', 'departure', 'arrival', 'airline', 'operatingAirline', 'flightNumber', + 'serviceClass', 'plane', 'details', 'duration', 'techStops', 'bookingClass', 'baggage', 'fareBasisCode', 'group', 'uapi_segment_ref', 'uapiSegmentReference', ]); expect(segment.from).to.match(/^[A-Z]{3}$/); @@ -2195,6 +2195,7 @@ describe('#AirParser', () => { expect(segment).to.be.an('object'); expect(segment).to.have.all.keys([ 'airline', + 'operatingAirline', 'arrival', 'bookingClass', 'departure', @@ -2340,7 +2341,7 @@ describe('#AirParser', () => { leg.forEach((segment) => { expect(segment).to.be.an('object'); expect(segment).to.have.all.keys([ - 'from', 'to', 'departure', 'arrival', 'airline', + 'from', 'to', 'departure', 'arrival', 'airline', 'operatingAirline', 'flightNumber', 'plane', 'duration', 'uapi_segment_ref', 'group', 'availability', 'uapiSegmentReference', ]); From 3b9412548c5074a863aee3e6da2140d301d1cef7 Mon Sep 17 00:00:00 2001 From: Oleksii Date: Thu, 21 Mar 2024 12:35:35 +0200 Subject: [PATCH 3/3] TC-3724: patch version update --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a26bb1ca..0e347394 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uapi-json", - "version": "1.16.4", + "version": "1.16.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "uapi-json", - "version": "1.16.4", + "version": "1.16.5", "license": "MIT", "dependencies": { "axios": "^1.6.2", @@ -2152,9 +2152,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", diff --git a/package.json b/package.json index 9be4cdc0..e25f9cdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uapi-json", - "version": "1.16.4", + "version": "1.16.5", "description": "Travelport Universal API", "main": "src/", "files": [