@sabstravtech/obtservices 0.0.3 → 0.0.19020100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular/fetchers.d.ts +1 -0
- package/angular/lib/vendor/classes/helpers.d.ts +6 -3
- package/angular/lib/vendor/fetchers/conferma-office.fetcher.d.ts +6 -0
- package/angular/lib/vendor/fetchers/search-irl-stations.fetcher.d.ts +7 -0
- package/angular/lib/vendor/services/search.service.d.ts +5 -3
- package/angular/lib/vendor/types/graphql.angular.types.d.ts +268 -6
- package/angular/obtservices.module.d.ts +1 -1
- package/angular/sabstravtech-obtservices-angular.d.ts +6 -5
- package/angular/sabstravtech-obtservices-angular.metadata.json +1 -1
- package/base/fetchers.d.ts +2 -0
- package/base/lib/vendor/classes/base-enterprise.d.ts +4 -0
- package/base/lib/vendor/classes/bookable-basket.d.ts +1 -1
- package/base/lib/vendor/classes/cabhire-enterprise-search.d.ts +6 -1
- package/base/lib/vendor/classes/carhire-enterprise-search.d.ts +2 -1
- package/base/lib/vendor/classes/eurostar-enterprise-search.d.ts +21 -5
- package/base/lib/vendor/classes/flight-enterprise-search.d.ts +22 -75
- package/base/lib/vendor/classes/helpers.d.ts +3 -0
- package/base/lib/vendor/classes/hotel-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/classes/irl-enterprise-search.d.ts +21 -10
- package/base/lib/vendor/classes/lounges-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/classes/parking-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/classes/rail-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/fetchers/conferma-office.fetcher.d.ts +20 -0
- package/base/lib/vendor/fetchers/irl-quote-fetcher.d.ts +1 -1
- package/base/lib/vendor/fetchers/search-irl-stations.fetcher.d.ts +20 -0
- package/base/lib/vendor/interfaces/Icabhire-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/interfaces/Ienterprise-basket.service.d.ts +1 -1
- package/base/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +4 -35
- package/base/lib/vendor/interfaces/Iflight-enterprise-search.d.ts +4 -40
- package/base/lib/vendor/interfaces/Iirl-enterprise-search.d.ts +9 -2
- package/base/lib/vendor/interfaces/Isearch.service.d.ts +3 -1
- package/base/lib/vendor/interfaces/flight-filters.interface.d.ts +21 -25
- package/base/lib/vendor/interfaces/hotel-recent-search-args.interface.d.ts +23 -0
- package/base/lib/vendor/interfaces/value-display.d.ts +2 -2
- package/base/lib/vendor/models/traveller.object.d.ts +7 -0
- package/base/lib/vendor/services/enterprise-basket.service.d.ts +1 -1
- package/base/lib/vendor/services/search.service.d.ts +10 -3
- package/base/lib/vendor/types/graphql.types.d.ts +253 -6
- package/base/lib/vendor/types/types.d.ts +11 -2
- package/base/sabstravtech-obtservices-base.metadata.json +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.js +200 -64
- package/bundles/sabstravtech-obtservices-angular.umd.js.map +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.min.js +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.min.js.map +1 -1
- package/bundles/sabstravtech-obtservices-base.umd.js +1632 -1085
- package/bundles/sabstravtech-obtservices-base.umd.js.map +1 -1
- package/bundles/sabstravtech-obtservices-base.umd.min.js +2 -2
- package/bundles/sabstravtech-obtservices-base.umd.min.js.map +1 -1
- package/esm2015/angular/fetchers.js +2 -1
- package/esm2015/angular/lib/vendor/classes/helpers.js +25 -4
- package/esm2015/angular/lib/vendor/fetchers/conferma-office.fetcher.js +22 -0
- package/esm2015/angular/lib/vendor/fetchers/search-irl-stations.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/services/search.service.js +35 -29
- package/esm2015/angular/lib/vendor/types/graphql.angular.types.js +174 -6
- package/esm2015/angular/obtservices.module.js +3 -3
- package/esm2015/angular/sabstravtech-obtservices-angular.js +7 -6
- package/esm2015/base/fetchers.js +3 -1
- package/esm2015/base/lib/vendor/classes/base-enterprise.js +49 -2
- package/esm2015/base/lib/vendor/classes/bookable-basket.js +2 -2
- package/esm2015/base/lib/vendor/classes/cabhire-enterprise-search.js +95 -15
- package/esm2015/base/lib/vendor/classes/carhire-enterprise-search.js +2 -1
- package/esm2015/base/lib/vendor/classes/eurostar-enterprise-search.js +262 -52
- package/esm2015/base/lib/vendor/classes/flight-enterprise-search.js +439 -713
- package/esm2015/base/lib/vendor/classes/helpers.js +239 -24
- package/esm2015/base/lib/vendor/classes/hotel-enterprise-search.js +74 -70
- package/esm2015/base/lib/vendor/classes/irl-enterprise-search.js +153 -118
- package/esm2015/base/lib/vendor/classes/lounges-enterprise-search.js +2 -1
- package/esm2015/base/lib/vendor/classes/management-info-and-valid.js +58 -1
- package/esm2015/base/lib/vendor/classes/parking-enterprise-search.js +6 -3
- package/esm2015/base/lib/vendor/classes/rail-enterprise-search.js +2 -1
- package/esm2015/base/lib/vendor/fetchers/conferma-office.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/irl-quote-fetcher.js +2 -2
- package/esm2015/base/lib/vendor/fetchers/search-irl-stations.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/interfaces/Icabhire-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Ienterprise-basket.service.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Iflight-enterprise-search.js +43 -2
- package/esm2015/base/lib/vendor/interfaces/Iirl-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Isearch.service.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/flight-filters.interface.js +2 -1
- package/esm2015/base/lib/vendor/interfaces/hotel-recent-search-args.interface.js +2 -0
- package/esm2015/base/lib/vendor/interfaces/value-display.js +1 -1
- package/esm2015/base/lib/vendor/models/traveller.object.js +8 -1
- package/esm2015/base/lib/vendor/services/enterprise-basket.service.js +3 -2
- package/esm2015/base/lib/vendor/services/search.service.js +67 -12
- package/esm2015/base/lib/vendor/types/graphql.types.js +13 -2
- package/esm2015/base/lib/vendor/types/types.js +1 -1
- package/fesm2015/sabstravtech-obtservices-angular.js +238 -16
- package/fesm2015/sabstravtech-obtservices-angular.js.map +1 -1
- package/fesm2015/sabstravtech-obtservices-base.js +1561 -1045
- package/fesm2015/sabstravtech-obtservices-base.js.map +1 -1
- package/package.json +4 -4
package/base/fetchers.d.ts
CHANGED
|
@@ -29,8 +29,10 @@ export * from './lib/vendor/fetchers/search-depots.fetcher';
|
|
|
29
29
|
export * from './lib/vendor/fetchers/get-user-company-offices.fetcher';
|
|
30
30
|
export * from './lib/vendor/fetchers/search-hotel-chains.fetcher';
|
|
31
31
|
export * from './lib/vendor/fetchers/conferma-office-names.fetcher';
|
|
32
|
+
export * from './lib/vendor/fetchers/conferma-office.fetcher';
|
|
32
33
|
export * from './lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher';
|
|
33
34
|
export * from './lib/vendor/fetchers/get-risk-alerts.fetcher';
|
|
34
35
|
export * from './lib/vendor/fetchers/conferma-quicklist.fetcher';
|
|
35
36
|
export * from './lib/vendor/fetchers/get-rail-cards.fetcher';
|
|
36
37
|
export * from './lib/vendor/fetchers/eurostar-quote.fetcher';
|
|
38
|
+
export * from './lib/vendor/fetchers/search-irl-stations.fetcher';
|
|
@@ -9,22 +9,26 @@ export declare abstract class BaseEnterpriseSearch<P, R, O extends Array<any>> {
|
|
|
9
9
|
protected _originalUserSearch: P;
|
|
10
10
|
isValid: BehaviorSubject<boolean>;
|
|
11
11
|
results: BehaviorSubject<O>;
|
|
12
|
+
multiResults: BehaviorSubject<O[][]>;
|
|
12
13
|
messages: BehaviorSubject<string[]>;
|
|
13
14
|
messagesInfo: BehaviorSubject<string[]>;
|
|
14
15
|
validationMessages: string[];
|
|
15
16
|
infoMessages: string[];
|
|
16
17
|
isLoading: BehaviorSubject<boolean>;
|
|
17
18
|
protected abstract resultsSessionName: string;
|
|
19
|
+
protected abstract multiResultsSessionName: string;
|
|
18
20
|
protected tempParams: P;
|
|
19
21
|
protected doChecks: boolean;
|
|
20
22
|
abstract type: ServiceType;
|
|
21
23
|
fullResults: O;
|
|
24
|
+
fullMultiResults: O[][];
|
|
22
25
|
private mapper;
|
|
23
26
|
get cheapestPrice(): ICheapestPrice;
|
|
24
27
|
get originalUserSearch(): P;
|
|
25
28
|
constructor(storageService: BaseStorageService, mapper?: (r: R) => O);
|
|
26
29
|
protected updateTempParams(tempParams: P): void;
|
|
27
30
|
protected _startSearch(results: Observable<R>): Promise<boolean>;
|
|
31
|
+
protected _startMultiSearch(resultsArray: Observable<R>[]): Promise<boolean>;
|
|
28
32
|
reset(): void;
|
|
29
33
|
protected makeSessionResults(data: O): any;
|
|
30
34
|
protected abstract resetQuery(): void;
|
|
@@ -17,7 +17,7 @@ export declare class BookableBasket {
|
|
|
17
17
|
loadBasket(id: string): void;
|
|
18
18
|
private _loadBasket;
|
|
19
19
|
updateBasket(basket: BasketDetails): void;
|
|
20
|
-
sendBasketForApproval(): void
|
|
20
|
+
sendBasketForApproval(): Promise<void>;
|
|
21
21
|
workoutApprovedState(basket: BasketDetails): BookingStatus;
|
|
22
22
|
workoutState(basket: BasketDetails, defaultState: BookingStatus): BookingStatus;
|
|
23
23
|
workoutOpenState(basket: BasketDetails): BookingStatus;
|
|
@@ -16,7 +16,9 @@ export declare class CabHireEnterpriseSearch<CH_Q extends CabhireQuoteFetcherTyp
|
|
|
16
16
|
private searchService;
|
|
17
17
|
private basketService;
|
|
18
18
|
static readonly STORAGE_SESSION_PARAMS = "search_cab";
|
|
19
|
+
static readonly SECONDARY_STORAGE_SESSION_PARAMS = "secondary_search_cab";
|
|
19
20
|
static readonly STORAGE_SESSION_RESULTS = "results_cab";
|
|
21
|
+
static readonly MULTI_STORAGE_SESSION_RESULTS = "multi_results_cab";
|
|
20
22
|
private outboundVisibility;
|
|
21
23
|
private inboundVisibility;
|
|
22
24
|
type: ServiceType;
|
|
@@ -29,6 +31,7 @@ export declare class CabHireEnterpriseSearch<CH_Q extends CabhireQuoteFetcherTyp
|
|
|
29
31
|
readonly criteria: string[];
|
|
30
32
|
mode: TaxiFormMode;
|
|
31
33
|
minSelectDate: moment.Moment;
|
|
34
|
+
minReturnSelectDate: NgbDateStruct;
|
|
32
35
|
private _date;
|
|
33
36
|
selectedPlaces: any;
|
|
34
37
|
private _fromLocation;
|
|
@@ -96,6 +99,7 @@ export declare class CabHireEnterpriseSearch<CH_Q extends CabhireQuoteFetcherTyp
|
|
|
96
99
|
set toStation(value: RailAirport);
|
|
97
100
|
constructor(cabfetcher: BaseCabhireQuoteFetcher<CH_Q>, helpers: BaseHelperRoutines, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface, basketService: EnterpriseBasketServiceInterface);
|
|
98
101
|
protected resultsSessionName: string;
|
|
102
|
+
protected multiResultsSessionName: string;
|
|
99
103
|
protected resetQuery(): void;
|
|
100
104
|
resetParams(): void;
|
|
101
105
|
private _isValid;
|
|
@@ -104,11 +108,12 @@ export declare class CabHireEnterpriseSearch<CH_Q extends CabhireQuoteFetcherTyp
|
|
|
104
108
|
getRecentSearchQuery(query: QuerySearchCabHireArgs): SaveRecentSearchMutationVariables;
|
|
105
109
|
startRecentSearch(recentSearch: RecentSearch): void;
|
|
106
110
|
getSearchQuery(): QuerySearchCabHireArgs;
|
|
111
|
+
getReturnSearchQuery(): QuerySearchCabHireArgs;
|
|
107
112
|
updateOutboundAddress(location: any, placeDescription?: string): void;
|
|
108
113
|
updateInboundAddress(location: any, placeDescription?: string): void;
|
|
109
114
|
private createCabHireLocation;
|
|
110
115
|
matchAddresses(): void;
|
|
111
|
-
sortBy(asc?: boolean): void;
|
|
116
|
+
sortBy(asc?: boolean, returnIndex?: number): void;
|
|
112
117
|
getAddressFormat(location: any, placeDescription?: string): {
|
|
113
118
|
House: string;
|
|
114
119
|
Street: string;
|
|
@@ -120,7 +120,7 @@ export declare class CarhireEnterpriseSearch<CH_Q extends CarHireFetcherType, CH
|
|
|
120
120
|
set airCon(newCon: boolean);
|
|
121
121
|
get locationType(): LocationTypes;
|
|
122
122
|
set locationType(value: LocationTypes);
|
|
123
|
-
get timeArray(): ValueDisplay[];
|
|
123
|
+
get timeArray(): ValueDisplay<string>[];
|
|
124
124
|
get carAirConditionTypes(): [string, string, boolean][];
|
|
125
125
|
get carTransmissionCodes(): [string, string, CarHireTransmission][];
|
|
126
126
|
get carTypeCodes(): [string, string, CarHireType][];
|
|
@@ -128,6 +128,7 @@ export declare class CarhireEnterpriseSearch<CH_Q extends CarHireFetcherType, CH
|
|
|
128
128
|
get sortingOptions(): CarHireSort[];
|
|
129
129
|
constructor(carhirefetcher: BaseCarhireQuoteFetcher<CH_Q>, carHireAvailabilityDetailFetcher: BaseCarHireAvailabilityDetailFetcher<CHAD_Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
130
130
|
protected resultsSessionName: string;
|
|
131
|
+
protected multiResultsSessionName: string;
|
|
131
132
|
protected resetQuery(): void;
|
|
132
133
|
private _isValid;
|
|
133
134
|
startSearch(): Promise<boolean>;
|
|
@@ -7,7 +7,7 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
7
7
|
import { ValueDisplay } from '../interfaces/value-display';
|
|
8
8
|
import { FlightFilters } from '../interfaces/flight-filters.interface';
|
|
9
9
|
import { SelectFilter } from '../interfaces/select-filter.interface';
|
|
10
|
-
import { BasketItem, DestinationEntry, FareType, FlightCabinClass, FlightFareTotal, FlightItinerary, FlightJourney, SearchFlightsV2QueryVariables, ServiceType } from '../types/graphql.types';
|
|
10
|
+
import { BasketItem, DestinationEntry, FareType, FlightCabinClass, FlightFareTotal, FlightItinerary, FlightJourney, SearchFlightsV2QueryVariables, ServiceType, SaveRecentSearchMutationVariables } from '../types/graphql.types';
|
|
11
11
|
import { EurostarQuoteResult, NgbDateStruct, OBTAirportDetails, OBTAirlinesDetails, FlightDirectionEnum, GroupedFlights, FlightItineraryWithSelected, RecentSearch, EurostarResults, EurostarItem, EurostarFare, EurostarClassEnum, EurostarQuoteResultArray } from '../types/types';
|
|
12
12
|
import { UserServiceInterface } from '../interfaces/Iuser.service';
|
|
13
13
|
import { EnterpriseSearchServiceInterface } from '../interfaces/Isearch.service';
|
|
@@ -29,7 +29,8 @@ export declare type EurostarStation = {
|
|
|
29
29
|
};
|
|
30
30
|
export declare enum SortTypesEurostar {
|
|
31
31
|
CheapestFirst = "C",
|
|
32
|
-
EarliestFirst = "E"
|
|
32
|
+
EarliestFirst = "E",
|
|
33
|
+
LatestFirst = "L"
|
|
33
34
|
}
|
|
34
35
|
export declare enum SortMethod {
|
|
35
36
|
sortByPrice = "sortByPrice",
|
|
@@ -97,13 +98,15 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
97
98
|
protected grouped: GroupedFlights;
|
|
98
99
|
travellers: Traveller[];
|
|
99
100
|
protected resultsSessionName: string;
|
|
101
|
+
protected multiResultsSessionName: string;
|
|
100
102
|
selectedGroupFlight: FlightItineraryWithSelected;
|
|
101
103
|
private _displayAddHotel;
|
|
104
|
+
filters: BehaviorSubject<FlightFilters>;
|
|
102
105
|
get displayAddHotel(): boolean;
|
|
103
106
|
set displayAddHotel(newVal: boolean);
|
|
104
107
|
selectedGroupEurostar: EurostarItem;
|
|
105
108
|
selectedEurostarFare: EurostarFare;
|
|
106
|
-
get timeArray(): ValueDisplay[];
|
|
109
|
+
get timeArray(): ValueDisplay<string>[];
|
|
107
110
|
get preferredCarriers(): OBTAirlinesDetails[];
|
|
108
111
|
set preferredCarriers(value: OBTAirlinesDetails[]);
|
|
109
112
|
get operator1(): OBTAirlinesDetails;
|
|
@@ -169,9 +172,11 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
169
172
|
resetParams(): void;
|
|
170
173
|
private _isValid;
|
|
171
174
|
startSearch(): Promise<boolean>;
|
|
175
|
+
getRecentSearchQuery(query: SearchFlightsV2QueryVariables): SaveRecentSearchMutationVariables;
|
|
172
176
|
startRecentSearch(recentSearch: RecentSearch): void;
|
|
173
177
|
private makeDepartureTimeWindow;
|
|
174
178
|
private makeArrivalTimeWindow;
|
|
179
|
+
convertRecentSearchDateTime(date: string, timeWindow?: string): moment.Moment;
|
|
175
180
|
getSearchQuery(): SearchFlightsV2QueryVariables;
|
|
176
181
|
private updateTravellers;
|
|
177
182
|
private updateAvaliableClasses;
|
|
@@ -180,6 +185,10 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
180
185
|
* @todo - Fill out Preferred and Co2 sorting when we have that data
|
|
181
186
|
*/
|
|
182
187
|
sortResults(sortMethodValue: SortTypesEurostar, givenResults?: EurostarResults[]): void;
|
|
188
|
+
sortResultsFlightJourneys(sortMethodValue: SortTypesEurostar, inbound?: boolean, givenResults?: FlightItinerary[]): FlightItinerary[];
|
|
189
|
+
sortByPriceFlight(results: FlightItinerary[]): FlightItinerary[];
|
|
190
|
+
sortByDateFlight(results: FlightItinerary[], inbound: boolean): FlightItinerary[];
|
|
191
|
+
sortByDateFlightDecending(results: FlightItinerary[], inbound: boolean): FlightItinerary[];
|
|
183
192
|
/**
|
|
184
193
|
* Sort results by departure time
|
|
185
194
|
*
|
|
@@ -203,6 +212,14 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
203
212
|
* @param min - the min in 100th's to transform onto 60th's
|
|
204
213
|
*/
|
|
205
214
|
transformMin(min: number): string;
|
|
215
|
+
/**
|
|
216
|
+
* @description - apply all filters to results
|
|
217
|
+
* @param filters
|
|
218
|
+
* @param inbound
|
|
219
|
+
* @param results
|
|
220
|
+
* @returns
|
|
221
|
+
*/
|
|
222
|
+
applyFilters(filters: FlightFilters, inbound?: boolean): void;
|
|
206
223
|
filterByDuration(minDuration: number, maxDuration: number, results: FlightItinerary[], isReturn?: boolean): FlightItinerary[];
|
|
207
224
|
filterByDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): FlightItinerary[];
|
|
208
225
|
filterByReturnDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): FlightItinerary[];
|
|
@@ -222,7 +239,6 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
222
239
|
filterByArrivalAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
223
240
|
filterByDepartureReturnAirport(departureAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
224
241
|
filterByArrivalReturnAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
225
|
-
createFilters(results?: FlightItinerary[]): FlightFilters;
|
|
226
242
|
getMinDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
227
243
|
getMaxDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
228
244
|
getMinArrivalTime(results: FlightItinerary[]): number;
|
|
@@ -254,7 +270,7 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
254
270
|
*/
|
|
255
271
|
getAllAirlines(results: FlightItinerary[]): SelectFilter[];
|
|
256
272
|
selectGroupedEurostar(selectedEurostar: EurostarItem, fare: EurostarFare, direction: FlightDirectionEnum): Promise<void>;
|
|
257
|
-
updateLowestPrice(results:
|
|
273
|
+
updateLowestPrice(results: EurostarQuoteResultArray): ICheapestPrice;
|
|
258
274
|
doBooking(intBasket: InternalBasketInterface, selectedFlight: EurostarItem, schemaDetails: any, outboundDate: string, inboundDate?: string): void;
|
|
259
275
|
makeSchemaFlights(selectedFlight: FlightJourney, flightGroup: 'outbound' | 'inbound', groupIndex: number, segmentIndex?: number): any;
|
|
260
276
|
private createGroupedItem;
|
|
@@ -6,9 +6,8 @@ import { Traveller } from '../models/traveller.object';
|
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { ValueDisplay } from '../interfaces/value-display';
|
|
8
8
|
import { FlightFilters } from '../interfaces/flight-filters.interface';
|
|
9
|
-
import { SelectFilter } from '../interfaces/select-filter.interface';
|
|
10
9
|
import { BasketItem, DestinationEntry, FareType, FlightCabinClass, FlightItinerary, FlightJourney, SaveRecentSearchMutationVariables, SearchFlightsV2QueryVariables, ServiceType } from '../types/graphql.types';
|
|
11
|
-
import { FlightAllQuoteResult, FlightQuoteResultArray, NgbDateStruct, OBTAirportDetails, OBTAirlinesDetails, FlightDirectionEnum, GroupedFlights, FlightItineraryWithSelected, RecentSearch } from '../types/types';
|
|
10
|
+
import { FlightAllQuoteResult, FlightGroupedQuoteResult, FlightQuoteResultArray, NgbDateStruct, OBTAirportDetails, OBTAirlinesDetails, FlightDirectionEnum, GroupedFlights, FlightItineraryWithSelected, RecentSearch } from '../types/types';
|
|
12
11
|
import { BaseFlightQuoteFetcher, FlightQuoteFetcherType } from '../fetchers/flight-quote.fetcher';
|
|
13
12
|
import { UserServiceInterface } from '../interfaces/Iuser.service';
|
|
14
13
|
import { EnterpriseSearchServiceInterface } from '../interfaces/Isearch.service';
|
|
@@ -31,15 +30,19 @@ export declare enum TimeWindow {
|
|
|
31
30
|
Depart = "Depart By",
|
|
32
31
|
Arrive = "Arrive By"
|
|
33
32
|
}
|
|
34
|
-
export declare enum
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
LowestEmissions = "
|
|
33
|
+
export declare enum FlightSortTypes {
|
|
34
|
+
Cheapest = "Cheapest",
|
|
35
|
+
MostExpensive = "Most Expensive",
|
|
36
|
+
Fastest = "Fastest",
|
|
37
|
+
Preferred = "Preferred",
|
|
38
|
+
LowestEmissions = "Lowest Emissions",
|
|
39
|
+
DepartureTime = "Departure Time",
|
|
40
|
+
ArrivalTime = "Arrival Time",
|
|
41
|
+
Quickest = "Quickest",
|
|
42
|
+
MostDirect = "Most Direct"
|
|
40
43
|
}
|
|
41
|
-
export declare type FlightGroups = 'LiteEconomy' | 'Economy' | 'EconomyNoBags' | 'EconomyRestricted' | 'PremiumEconomy' | 'Business' | 'PremiumBusiness' | 'First' | 'PremiumFirst';
|
|
42
|
-
export declare type RestrictedFlightGroups = '
|
|
44
|
+
export declare type FlightGroups = 'LiteEconomy' | 'Economy' | 'EconomyNoBags' | 'EconomyRestricted' | 'EconomyFlexi' | 'PremiumEconomy' | 'Business' | 'PremiumBusiness' | 'First' | 'PremiumFirst';
|
|
45
|
+
export declare type RestrictedFlightGroups = 'EconomyNoBags' | 'EconomyFlexi' | 'EconomyRestricted' | 'PremiumEconomy' | 'Business' | 'First';
|
|
43
46
|
interface FlightSessionType {
|
|
44
47
|
results: FlightQuoteResultArray;
|
|
45
48
|
groupData: {
|
|
@@ -63,6 +66,8 @@ export declare class FlightEnterpriseSearch<FQ_Q extends FlightQuoteFetcherType>
|
|
|
63
66
|
private _nearby_airports;
|
|
64
67
|
private _timeArray;
|
|
65
68
|
private _sortArray;
|
|
69
|
+
private _sortItinaryRoutines;
|
|
70
|
+
private _sortGroupedRoutines;
|
|
66
71
|
private _fareTypeArray;
|
|
67
72
|
minimumOutBoundDate: {
|
|
68
73
|
year: number;
|
|
@@ -89,10 +94,12 @@ export declare class FlightEnterpriseSearch<FQ_Q extends FlightQuoteFetcherType>
|
|
|
89
94
|
protected grouped: GroupedFlights;
|
|
90
95
|
travellers: Traveller[];
|
|
91
96
|
protected resultsSessionName: string;
|
|
97
|
+
protected multiResultsSessionName: string;
|
|
92
98
|
selectedGroupFlight: FlightItineraryWithSelected;
|
|
93
99
|
private _showHotelForm;
|
|
94
100
|
private _hotelSearchRequested;
|
|
95
|
-
|
|
101
|
+
filters: BehaviorSubject<FlightFilters>;
|
|
102
|
+
get timeArray(): ValueDisplay<string>[];
|
|
96
103
|
get preferredCarriers(): OBTAirlinesDetails[];
|
|
97
104
|
set preferredCarriers(value: OBTAirlinesDetails[]);
|
|
98
105
|
get operator1(): OBTAirlinesDetails;
|
|
@@ -148,8 +155,8 @@ export declare class FlightEnterpriseSearch<FQ_Q extends FlightQuoteFetcherType>
|
|
|
148
155
|
get hotelSearchRequested(): boolean;
|
|
149
156
|
set hotelSearchRequested(newVal: boolean);
|
|
150
157
|
setMultiDestinationQuery(multiDestination: IMultiDestination[]): DestinationEntry[];
|
|
151
|
-
get sortDropdownValues(): ValueDisplay[];
|
|
152
|
-
get fareTypesValues(): ValueDisplay[];
|
|
158
|
+
get sortDropdownValues(): ValueDisplay<FlightSortTypes>[];
|
|
159
|
+
get fareTypesValues(): ValueDisplay<FareType>[];
|
|
153
160
|
get fareType(): FareType;
|
|
154
161
|
set fareType(value: FareType);
|
|
155
162
|
get negotiated(): boolean;
|
|
@@ -174,74 +181,14 @@ export declare class FlightEnterpriseSearch<FQ_Q extends FlightQuoteFetcherType>
|
|
|
174
181
|
getSearchQuery(): SearchFlightsV2QueryVariables;
|
|
175
182
|
private updateTravellers;
|
|
176
183
|
private updateAvaliableClasses;
|
|
177
|
-
/**
|
|
178
|
-
* @description - sort the flight results
|
|
179
|
-
* @todo - Fill out Preferred and Co2 sorting when we have that data
|
|
180
|
-
*/
|
|
181
|
-
sortResults(sortMethodValue: SortTypes, givenResults?: FlightItinerary[]): FlightItinerary[];
|
|
182
184
|
updateFromPreviousSearches(previousItems: Record<ServiceType, BasketItem>): void;
|
|
183
185
|
getTotalBaggage(result: FlightItinerary): number;
|
|
186
|
+
isGroupedFlights(toTest: FlightQuoteResultArray): toTest is FlightGroupedQuoteResult[];
|
|
184
187
|
/**
|
|
185
188
|
* @description - filter the results, then sort the remainder
|
|
186
189
|
* @todo - Add filters for travel policy, fare types and ancilliaries
|
|
187
190
|
*/
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @description - give the correct format for transfering minuetes on the sliders
|
|
191
|
-
* @param min - the min in 100th's to transform onto 60th's
|
|
192
|
-
*/
|
|
193
|
-
transformMin(min: number): string;
|
|
194
|
-
filterByDuration(minDuration: number, maxDuration: number, results: FlightItinerary[], isReturn?: boolean): FlightItinerary[];
|
|
195
|
-
filterByDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): FlightItinerary[];
|
|
196
|
-
filterByReturnDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): FlightItinerary[];
|
|
197
|
-
filterByReturnArrivalTime(minArr: number, maxArr: number, results: FlightItinerary[]): FlightItinerary[];
|
|
198
|
-
filterByArrivalTime(minArr: number, maxArr: number, results: FlightItinerary[]): FlightItinerary[];
|
|
199
|
-
filterByBaggage(baggageFilters: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
200
|
-
filterByPrice(minPrice: number, maxPrice: number, results: FlightItinerary[]): FlightItinerary[];
|
|
201
|
-
/**
|
|
202
|
-
* @description - filter the results by the number of stops
|
|
203
|
-
* @param stopFilters - the selected stops
|
|
204
|
-
* @param fullResults - all of our results so far
|
|
205
|
-
*/
|
|
206
|
-
filterResultsByStops(stopFilters: SelectFilter[], fullResults: FlightItinerary[]): FlightItinerary[];
|
|
207
|
-
filterResultsByAirline(airlineFilters: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
208
|
-
filterResultsByClass(classFilters: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
209
|
-
filterByDepartureAirport(departureAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
210
|
-
filterByArrivalAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
211
|
-
filterByDepartureReturnAirport(departureAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
212
|
-
filterByArrivalReturnAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): FlightItinerary[];
|
|
213
|
-
filterByFlightNumber(flightNumber: string, results: FlightItinerary[]): FlightItinerary[];
|
|
214
|
-
createFilters(results?: FlightItinerary[]): FlightFilters;
|
|
215
|
-
getMinDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
216
|
-
getMaxDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
217
|
-
getMinArrivalTime(results: FlightItinerary[]): number;
|
|
218
|
-
getMinReturnArrivalTime(results: FlightItinerary[]): number;
|
|
219
|
-
getMaxReturnArrivalTime(results: FlightItinerary[]): number;
|
|
220
|
-
getMaxArrivalTime(results: FlightItinerary[]): number;
|
|
221
|
-
getMinDepartureTime(results: FlightItinerary[]): number;
|
|
222
|
-
getMinReturnDepartureTime(results: FlightItinerary[]): number;
|
|
223
|
-
getMaxReturnDepartureTime(results: FlightItinerary[]): number;
|
|
224
|
-
getMaxDepartureTime(results: FlightItinerary[]): number;
|
|
225
|
-
getBaggage(results: FlightItinerary[]): SelectFilter[];
|
|
226
|
-
getMinPrice(results: FlightItinerary[]): number;
|
|
227
|
-
getMaxPrice(results: FlightItinerary[]): number;
|
|
228
|
-
getAllStops(results: FlightItinerary[]): SelectFilter[];
|
|
229
|
-
getAllClasses(results: FlightItinerary[]): SelectFilter[];
|
|
230
|
-
/**
|
|
231
|
-
* @description - create select filters for all unique departure airports returned in the search
|
|
232
|
-
* @param results - the flight results
|
|
233
|
-
*/
|
|
234
|
-
getAllDepartureAirports(results: FlightItinerary[], inbound?: boolean): SelectFilter[];
|
|
235
|
-
/**
|
|
236
|
-
* @description - create select filters for all unique departure airports returned in the search
|
|
237
|
-
* @param results - the flight results
|
|
238
|
-
*/
|
|
239
|
-
getAllArrivalAirports(results: FlightItinerary[], inbound?: boolean): SelectFilter[];
|
|
240
|
-
/**
|
|
241
|
-
* @description - create select filters for all unique airlines returned in the search
|
|
242
|
-
* @param results - the flight results
|
|
243
|
-
*/
|
|
244
|
-
getAllAirlines(results: FlightItinerary[]): SelectFilter[];
|
|
191
|
+
applyFilters(filters: FlightFilters, sortValue: FlightSortTypes): void;
|
|
245
192
|
updateLowestPrice(results: FlightQuoteResultArray): ICheapestPrice;
|
|
246
193
|
selectGroupedFlight(selectedFlight: FlightItineraryWithSelected, direction: FlightDirectionEnum): Promise<void>;
|
|
247
194
|
doBooking(intBasket: InternalBasketInterface, selectedFlight: FlightItinerary, schemaDetails: any, outboundDate: string, inboundDate?: string): void;
|
|
@@ -7,6 +7,7 @@ import { UserServices } from '../interfaces/Iuser.service';
|
|
|
7
7
|
import { FlightDirectionEnum, MinMax, NgbDateStruct, Schema } from '../types/types';
|
|
8
8
|
import { Airport, BasketItem, FareConditions, FlightItinerary, FlightJourney, Service, ServiceType, UserPassengerTypeInput } from '../types/graphql.types';
|
|
9
9
|
import { SupplementaryBookingInfoInterface } from '../interfaces/Isupplementary-booking-info-impl';
|
|
10
|
+
import { FlightFilters } from '../interfaces/flight-filters.interface';
|
|
10
11
|
export declare class BaseHelperRoutines {
|
|
11
12
|
static READ_DATE_FORMAT: string;
|
|
12
13
|
static READ_TIME_FORMAT: string;
|
|
@@ -170,4 +171,6 @@ export declare class BaseHelperRoutines {
|
|
|
170
171
|
* @returns string/string[]
|
|
171
172
|
*/
|
|
172
173
|
splitStringOnCapitals(rawString: string, join?: boolean): string | string[];
|
|
174
|
+
createFlightFilters(journeys: FlightItinerary[], defaultFilters: FlightFilters): FlightFilters;
|
|
175
|
+
mapOverObject<T extends Record<string | number, V>, V>(items: Record<string | number, V>, callback: (value: V, key?: string | number) => V): Record<string | number, V>;
|
|
173
176
|
}
|
|
@@ -117,6 +117,7 @@ export declare class HotelEnterpriseSearch<HQ_Q extends HotelQuoteFetcherType, H
|
|
|
117
117
|
get filters(): HotelFilters;
|
|
118
118
|
constructor(hotelFetcher: BaseHotelQuoteFetcher<HQ_Q>, helpers: BaseHelperRoutines, userService: UserServiceInterface, environment: BaseEnvironment, avaliabilityService: BaseHotelAvalibilityService<HA_Q>, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface, httpCallService: AbstractHttpCallService, quickListFetcher: BaseSearchConfermaQuicklistFetcher<QL_Q>, getRailStationFetcher: BaseGetRailStationFetcher<GRS_Q>);
|
|
119
119
|
protected resultsSessionName: string;
|
|
120
|
+
protected multiResultsSessionName: string;
|
|
120
121
|
private query;
|
|
121
122
|
makeLocations(location: HotelLocation[]): {
|
|
122
123
|
[key: string]: HotelLocation[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import moment
|
|
1
|
+
import moment from 'moment';
|
|
2
2
|
import { BaseEnterpriseSearch } from './base-enterprise';
|
|
3
3
|
import { BaseStorageService } from '../services/storage.service';
|
|
4
4
|
import { BaseHelperRoutines } from './helpers';
|
|
@@ -6,18 +6,21 @@ import { RailTicketGroups } from '../interfaces/rail-ticket-groups.interface';
|
|
|
6
6
|
import { RailTicketGroup } from '../interfaces/rail-ticket-group.interface';
|
|
7
7
|
import { ValueDisplay } from '../interfaces/value-display';
|
|
8
8
|
import { NgbDateStruct, IrlQuoteResultArray, RecentSearch } from '../types/types';
|
|
9
|
-
import { BasketItem, IrlClass, IrlJourneyOption, IrlJourneyOptions, IrlTicketOption, SearchIrlQueryVariables, ServiceType, IrlJourneyType, IrlSupplier } from '../types/graphql.types';
|
|
9
|
+
import { BasketItem, IrlClass, IrlJourneyOption, IrlJourneyOptions, IrlTicketOption, SearchIrlQueryVariables, ServiceType, IrlJourneyType, IrlSupplier, IrlTicket } from '../types/graphql.types';
|
|
10
10
|
import { BaseIrlQuoteFetcher, IrlQuoteFetcherType } from '../fetchers/irl-quote-fetcher';
|
|
11
|
+
import { BaseSearchIrlStationsFetcher, SearchIrlStationsFetcherType } from '../fetchers/search-irl-stations.fetcher';
|
|
11
12
|
import { EnterpriseBasketServiceInterface } from '../interfaces/Ienterprise-basket.service';
|
|
12
13
|
import { EnterpriseSearchServiceInterface } from '../interfaces/Isearch.service';
|
|
13
14
|
import { IRLEnterpriseSearchInterface, IrlTempParams } from '../interfaces/Iirl-enterprise-search';
|
|
15
|
+
import { ages } from '../models/traveller.object';
|
|
14
16
|
import { ICheapestPrice } from '../interfaces/cheapest-price';
|
|
15
17
|
export declare enum IrlSearchCriteria {
|
|
16
18
|
Depart = "Depart After",
|
|
17
19
|
Arrive = "Arrive Before"
|
|
18
20
|
}
|
|
19
|
-
export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends BaseEnterpriseSearch<IrlTempParams, IrlQuoteResultArray, IrlQuoteResultArray> implements IRLEnterpriseSearchInterface {
|
|
21
|
+
export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType, SIS_Q extends SearchIrlStationsFetcherType> extends BaseEnterpriseSearch<IrlTempParams, IrlQuoteResultArray, IrlQuoteResultArray> implements IRLEnterpriseSearchInterface {
|
|
20
22
|
private Irlfetcher;
|
|
23
|
+
private searchIrlStationsFetcher;
|
|
21
24
|
private helpers;
|
|
22
25
|
private basketService;
|
|
23
26
|
private searchService;
|
|
@@ -26,6 +29,7 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
26
29
|
static readonly PASSING_POINT = "Passing";
|
|
27
30
|
private travellers;
|
|
28
31
|
protected resultsSessionName: string;
|
|
32
|
+
protected multiResultsSessionName: string;
|
|
29
33
|
searchTypes: {
|
|
30
34
|
display: string;
|
|
31
35
|
value: IrlJourneyType;
|
|
@@ -35,10 +39,10 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
35
39
|
value: IrlClass;
|
|
36
40
|
}[];
|
|
37
41
|
ageRanges: {
|
|
38
|
-
key:
|
|
42
|
+
key: ages;
|
|
39
43
|
value: string;
|
|
40
44
|
}[];
|
|
41
|
-
|
|
45
|
+
irlCriteria: IrlSearchCriteria[];
|
|
42
46
|
travelCards: {
|
|
43
47
|
display: string;
|
|
44
48
|
value: string;
|
|
@@ -70,8 +74,8 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
70
74
|
get class(): IrlClass;
|
|
71
75
|
set class(data: IrlClass);
|
|
72
76
|
private _outboundDepartureDateTime;
|
|
73
|
-
get outboundDepartureDateTime(): Moment;
|
|
74
|
-
set outboundDepartureDateTime(
|
|
77
|
+
get outboundDepartureDateTime(): moment.Moment;
|
|
78
|
+
set outboundDepartureDateTime(newDateTime: moment.Moment);
|
|
75
79
|
private _departureLocationId;
|
|
76
80
|
get departureLocationId(): string;
|
|
77
81
|
set departureLocationId(data: string);
|
|
@@ -85,8 +89,8 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
85
89
|
get children(): number;
|
|
86
90
|
set children(data: number);
|
|
87
91
|
private _returnDepartureDateTime;
|
|
88
|
-
get returnDepartureDateTime(): Moment;
|
|
89
|
-
set returnDepartureDateTime(
|
|
92
|
+
get returnDepartureDateTime(): moment.Moment;
|
|
93
|
+
set returnDepartureDateTime(newDateTime: moment.Moment);
|
|
90
94
|
private _ageRange;
|
|
91
95
|
get ageRange(): string;
|
|
92
96
|
set ageRange(data: string);
|
|
@@ -94,6 +98,10 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
94
98
|
set chosenSearchClass(classR: IrlClass);
|
|
95
99
|
get outBoundDateTime(): moment.Moment;
|
|
96
100
|
set outBoundDateTime(newDateTime: moment.Moment);
|
|
101
|
+
get outboundCriteria(): IrlSearchCriteria;
|
|
102
|
+
set outboundCriteria(newCrit: IrlSearchCriteria);
|
|
103
|
+
get inBoundDateTime(): moment.Moment;
|
|
104
|
+
set inBoundDateTime(newDateTime: moment.Moment);
|
|
97
105
|
private _outbound_date;
|
|
98
106
|
get outbound_date(): NgbDateStruct;
|
|
99
107
|
set outbound_date(value: NgbDateStruct);
|
|
@@ -106,6 +114,8 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
106
114
|
private _return_time;
|
|
107
115
|
get return_time(): string;
|
|
108
116
|
set return_time(value: string);
|
|
117
|
+
get returnCriteria(): IrlSearchCriteria;
|
|
118
|
+
set returnCriteria(newCrit: IrlSearchCriteria);
|
|
109
119
|
get timeArray(): ValueDisplay[];
|
|
110
120
|
private _cheapestStandard;
|
|
111
121
|
get cheapestStandard(): IrlTicketOption;
|
|
@@ -117,7 +127,7 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
117
127
|
private _journeytype;
|
|
118
128
|
get journeyType(): IrlJourneyType;
|
|
119
129
|
set journeyType(data: IrlJourneyType);
|
|
120
|
-
constructor(Irlfetcher: BaseIrlQuoteFetcher<Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
130
|
+
constructor(Irlfetcher: BaseIrlQuoteFetcher<Q>, searchIrlStationsFetcher: BaseSearchIrlStationsFetcher<SIS_Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
121
131
|
protected resetQuery(): void;
|
|
122
132
|
private _isValid;
|
|
123
133
|
startSearch(): Promise<boolean>;
|
|
@@ -134,6 +144,7 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType> extends
|
|
|
134
144
|
*/
|
|
135
145
|
clearUnneededTickets(way: string, group: RailTicketGroup, timeSlotId: string): RailTicketGroup;
|
|
136
146
|
getLegsFromRailJourneyOption(railJourneyOption: IrlJourneyOption): any[];
|
|
147
|
+
addSingleJourneyToBasket(serviceId: string, railQuery: SearchIrlQueryVariables, irlJourneyOption: IrlTicket): Promise<boolean>;
|
|
137
148
|
updateLowestPrice(results: IrlJourneyOptions[]): ICheapestPrice;
|
|
138
149
|
findCheapestTicket(results: IrlJourneyOptions[]): number;
|
|
139
150
|
}
|
|
@@ -51,6 +51,7 @@ export declare class LoungesEnterpriseSearch<LQ_Q extends LoungeQuoteFetcherType
|
|
|
51
51
|
get arrivalDatetime(): moment.Moment;
|
|
52
52
|
set arrivalDatetime(value: moment.Moment);
|
|
53
53
|
protected resultsSessionName: string;
|
|
54
|
+
protected multiResultsSessionName: string;
|
|
54
55
|
constructor(loungefetcher: BaseLoungeQuoteFetcher<LQ_Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
55
56
|
protected resetQuery(): void;
|
|
56
57
|
getSearchQuery(): SearchLoungesQueryVariables;
|
|
@@ -86,6 +86,7 @@ export declare class ParkingEnterpriseSearch<Q extends ParkingQuoteFetcherType>
|
|
|
86
86
|
private travellers;
|
|
87
87
|
constructor(parkingfetcher: BaseParkingQuoteFetcher<Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
88
88
|
protected resultsSessionName: string;
|
|
89
|
+
protected multiResultsSessionName: string;
|
|
89
90
|
private _outdate;
|
|
90
91
|
private _outtime;
|
|
91
92
|
private _indate;
|
|
@@ -35,6 +35,7 @@ export declare class RailEnterpriseSearch<Q extends RailQuoteFetcherType, GRS_Q
|
|
|
35
35
|
static readonly PASSING_POINT = "Passing";
|
|
36
36
|
private travellers;
|
|
37
37
|
protected resultsSessionName: string;
|
|
38
|
+
protected multiResultsSessionName: string;
|
|
38
39
|
searchTypes: {
|
|
39
40
|
display: string;
|
|
40
41
|
value: RailJourneyType;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ConfermaOfficeResult } from '../types/types';
|
|
5
|
+
import { GetConfermaOfficeQuery, GetConfermaOfficeQueryVariables } from '../types/graphql.types';
|
|
6
|
+
import { FetchableObject } from './object-fetchable-enterprise';
|
|
7
|
+
declare type R = {
|
|
8
|
+
getConfermaOffice: P;
|
|
9
|
+
};
|
|
10
|
+
declare type P = ConfermaOfficeResult;
|
|
11
|
+
declare type A = GetConfermaOfficeQueryVariables;
|
|
12
|
+
declare type M = GetConfermaOfficeQuery;
|
|
13
|
+
export declare type ConfermaOfficeFetcherType = {
|
|
14
|
+
fetch: (a: A) => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseConfermaOfficeFetcher<Q extends ConfermaOfficeFetcherType> extends FetchableObject<Q, A, R, P, M> {
|
|
17
|
+
constructor(getUserAddressGQL: Q, modalService: BaseModalOpenerService);
|
|
18
|
+
protected getDataFromResult(results: ApolloQueryResult<R>): P;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
+
import { BaseHelperRoutines } from '../classes/helpers';
|
|
3
|
+
import { FetchableList } from './list-fetchable-enterprise';
|
|
4
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { SearchIrlSupplierStationsQuery, SearchIrlSupplierStationsQueryVariables, IrlSupplierStation } from '../types/graphql.types';
|
|
7
|
+
declare type R = {
|
|
8
|
+
searchIRLSupplierStations: P;
|
|
9
|
+
};
|
|
10
|
+
declare type P = IrlSupplierStation[];
|
|
11
|
+
declare type A = SearchIrlSupplierStationsQueryVariables;
|
|
12
|
+
declare type M = SearchIrlSupplierStationsQuery;
|
|
13
|
+
export declare type SearchIrlStationsFetcherType = {
|
|
14
|
+
fetch: (a: A) => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseSearchIrlStationsFetcher<Q extends SearchIrlStationsFetcherType> extends FetchableList<Q, A, R, P, M> {
|
|
17
|
+
constructor(gql: Q, helpers: BaseHelperRoutines, modalService: BaseModalOpenerService);
|
|
18
|
+
protected getDataFromResult(results: ApolloQueryResult<R>): P;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -105,6 +105,7 @@ export interface CabHireEnterpriseSearchInterface extends BaseEnterpriseSearch<C
|
|
|
105
105
|
cheapestPrice: ICheapestPrice;
|
|
106
106
|
startSearch(): any;
|
|
107
107
|
getSearchQuery(): SearchCabHireQueryVariables;
|
|
108
|
+
getReturnSearchQuery(): SearchCabHireQueryVariables;
|
|
108
109
|
updateOutboundAddress(location: any, placeDescription?: string): void;
|
|
109
110
|
updateInboundAddress(location: any, placeDescription?: string): void;
|
|
110
111
|
matchAddresses(): void;
|
|
@@ -48,7 +48,7 @@ export interface EnterpriseBasketServiceInterface {
|
|
|
48
48
|
setMiSelectedValue(basketid: string, miItem: ManagementInfo, selectedValue: string, userId: string): void;
|
|
49
49
|
getMiAutoSugestions(miId: string, partialLabel: string, isLoading: BehaviorSubject<boolean>): Observable<any>;
|
|
50
50
|
saveMiData(basketId: string, bmiArray: BasketItemManagementInfo[]): void;
|
|
51
|
-
sendBasketForApproval(basketid: string): void
|
|
51
|
+
sendBasketForApproval(basketid: string): Promise<void>;
|
|
52
52
|
bookBasket(basketid: string, supplementaryInfo: SupplementaryBookingInfo[]): void;
|
|
53
53
|
getBasket(query: {
|
|
54
54
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
3
|
import { FlightFilters } from './flight-filters.interface';
|
|
4
|
-
import { SelectFilter } from './select-filter.interface';
|
|
5
4
|
import { BasketItem, FareType, FlightCabinClass, FlightItinerary, SearchFlightsV2QueryVariables, ServiceType } from '../types/graphql.types';
|
|
6
5
|
import { EurostarFare, EurostarItem, EurostarQuoteResult, EurostarQuoteResultArray, EurostarResults, FlightDirectionEnum, NgbDateStruct, OBTAirlinesDetails, OBTAirportDetails } from '../types/types';
|
|
7
6
|
import { SortTypesEurostar } from '../classes/eurostar-enterprise-search';
|
|
@@ -76,46 +75,16 @@ export interface EurostarEnterpriseSearchInterface extends BaseEnterpriseSearch<
|
|
|
76
75
|
chosenSearchType: EurostarSearchType;
|
|
77
76
|
multiDestination: IMultiDestination[];
|
|
78
77
|
displayAddHotel: boolean;
|
|
79
|
-
searchTypes: ValueDisplay[];
|
|
78
|
+
searchTypes: ValueDisplay<string>[];
|
|
79
|
+
filters: BehaviorSubject<FlightFilters>;
|
|
80
|
+
applyFilters(filters: FlightFilters, inbound: boolean): void;
|
|
80
81
|
startSearch(): any;
|
|
81
82
|
getSearchQuery(): SearchFlightsV2QueryVariables;
|
|
82
83
|
sortResults(sortMethodValue: SortTypesEurostar, givenResults?: EurostarResults[]): void;
|
|
84
|
+
sortResultsFlightJourneys(sortMethodValue: SortTypesEurostar, inbound: boolean, givenResults?: FlightItinerary[]): FlightItinerary[];
|
|
83
85
|
updateFromPreviousSearches(previousItems: Record<ServiceType, BasketItem>): void;
|
|
84
86
|
getTotalBaggage(result: FlightItinerary): number;
|
|
85
87
|
transformMin(min: number): string;
|
|
86
|
-
filterByDuration(minDuration: number, maxDuration: number, results: FlightItinerary[], isReturn?: boolean): {};
|
|
87
|
-
filterByDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): {};
|
|
88
|
-
filterByReturnDepartureTime(minDep: number, maxDep: number, results: FlightItinerary[]): {};
|
|
89
|
-
filterByReturnArrivalTime(minArr: number, maxArr: number, results: FlightItinerary[]): {};
|
|
90
|
-
filterByArrivalTime(minArr: number, maxArr: number, results: FlightItinerary[]): {};
|
|
91
|
-
filterByBaggage(baggageFilters: SelectFilter[], results: FlightItinerary[]): {};
|
|
92
|
-
filterByPrice(minPrice: number, maxPrice: number, results: FlightItinerary[]): {};
|
|
93
|
-
filterResultsByStops(stopFilters: SelectFilter[], fullResults: FlightItinerary[]): {};
|
|
94
|
-
filterResultsByAirline(airlineFilters: SelectFilter[], results: FlightItinerary[]): {};
|
|
95
|
-
filterResultsByClass(classFilters: SelectFilter[], results: FlightItinerary[]): {};
|
|
96
|
-
filterByDepartureAirport(departureAirports: SelectFilter[], results: FlightItinerary[]): {};
|
|
97
|
-
filterByArrivalAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): {};
|
|
98
|
-
filterByDepartureReturnAirport(departureAirports: SelectFilter[], results: FlightItinerary[]): {};
|
|
99
|
-
filterByArrivalReturnAirport(arrivalAirports: SelectFilter[], results: FlightItinerary[]): {};
|
|
100
|
-
createFilters(results: FlightItinerary[]): FlightFilters;
|
|
101
|
-
getMinDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
102
|
-
getMaxDuration(results: FlightItinerary[], isReturn?: boolean): number;
|
|
103
|
-
getMinArrivalTime(results: FlightItinerary[]): number;
|
|
104
|
-
getMinReturnArrivalTime(results: FlightItinerary[]): number;
|
|
105
|
-
getMaxReturnArrivalTime(results: FlightItinerary[]): number;
|
|
106
|
-
getMaxArrivalTime(results: FlightItinerary[]): number;
|
|
107
|
-
getMinDepartureTime(results: FlightItinerary[]): number;
|
|
108
|
-
getMinReturnDepartureTime(results: FlightItinerary[]): number;
|
|
109
|
-
getMaxReturnDepartureTime(results: FlightItinerary[]): number;
|
|
110
|
-
getMaxDepartureTime(results: FlightItinerary[]): number;
|
|
111
|
-
getBaggage(results: FlightItinerary[]): {};
|
|
112
|
-
getMinPrice(results: FlightItinerary[]): number;
|
|
113
|
-
getMaxPrice(results: FlightItinerary[]): number;
|
|
114
|
-
getAllStops(results: FlightItinerary[]): {};
|
|
115
|
-
getAllClasses(results: FlightItinerary[]): {};
|
|
116
|
-
getAllDepartureAirports(results: FlightItinerary[], inbound?: boolean): {};
|
|
117
|
-
getAllArrivalAirports(results: FlightItinerary[], inbound?: boolean): {};
|
|
118
|
-
getAllAirlines(results: FlightItinerary[]): {};
|
|
119
88
|
updateLowestPrice(results: EurostarResults[]): ICheapestPrice;
|
|
120
89
|
resetParams(): void;
|
|
121
90
|
selectGroupedEurostar(selectedFlight: EurostarItem, fare: EurostarFare, direction: FlightDirectionEnum): void;
|